lib cac: add cac_listtasks

This commit is contained in:
tv 2015-05-20 19:15:12 +02:00
parent cc62429cf3
commit 56f65724e3

View File

@ -7,3 +7,13 @@ cac_listservers() {
"https://panel.cloudatcost.com/api/v1/listservers.php?key=$cac_key\\&login=$cac_login" "https://panel.cloudatcost.com/api/v1/listservers.php?key=$cac_key\\&login=$cac_login"
fi 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
}