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 +}