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