From 56f65724e368533342c8df146e412130afa4491e Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 20 May 2015 19:15:12 +0200 Subject: [PATCH] lib cac: add cac_listtasks --- lib/cac.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/cac.sh b/lib/cac.sh index c48f9d699..723c73769 100644 --- a/lib/cac.sh +++ b/lib/cac.sh @@ -7,3 +7,13 @@ cac_listservers() { "https://panel.cloudatcost.com/api/v1/listservers.php?key=$cac_key\\&login=$cac_login" fi } + +cac_listtasks() { + if test -z "${cac_via-}"; then + curl -fsS \ + "https://panel.cloudatcost.com/api/v1/listtasks.php?key=$cac_key&login=$cac_login" + else + ssh -q $cac_via -t curl -fsS \ + "https://panel.cloudatcost.com/api/v1/listtasks.php?key=$cac_key\\&login=$cac_login" + fi +}