stockholm/lib/cac.sh

32 lines
855 B
Bash
Raw Normal View History

cac_listservers() {
if test -z "${cac_via-}"; then
curl -fsS \
2015-05-20 17:18:55 +00:00
-G \
--data-urlencode key="$cac_key" \
--data-urlencode login="$cac_login" \
'https://panel.cloudatcost.com/api/v1/listservers.php'
else
ssh -q $cac_via -t curl -fsS \
2015-05-20 17:18:55 +00:00
-G \
--data-urlencode key="$cac_key" \
--data-urlencode login="$cac_login" \
'https://panel.cloudatcost.com/api/v1/listservers.php'
fi
}
2015-05-20 17:15:12 +00:00
cac_listtasks() {
if test -z "${cac_via-}"; then
curl -fsS \
2015-05-20 17:18:55 +00:00
-G \
--data-urlencode key="$cac_key" \
--data-urlencode login="$cac_login" \
'https://panel.cloudatcost.com/api/v1/listtasks.php'
2015-05-20 17:15:12 +00:00
else
ssh -q $cac_via -t curl -fsS \
2015-05-20 17:18:55 +00:00
-G \
--data-urlencode key="$cac_key" \
--data-urlencode login="$cac_login" \
'https://panel.cloudatcost.com/api/v1/listtasks.php'
2015-05-20 17:15:12 +00:00
fi
}