summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-05-20 19:15:12 +0200
committertv <tv@shackspace.de>2015-05-20 19:15:12 +0200
commit56f65724e368533342c8df146e412130afa4491e (patch)
tree5028d4366b26c9ffb96af868257622be735ff793 /lib
parentcc62429cf3cbe638b932e9226ffe59c74b7dd873 (diff)
lib cac: add cac_listtasks
Diffstat (limited to 'lib')
-rw-r--r--lib/cac.sh10
1 files changed, 10 insertions, 0 deletions
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
+}