lib cac: curl w/-G
This commit is contained in:
parent
56f65724e3
commit
d7319a7e87
20
lib/cac.sh
20
lib/cac.sh
@ -1,19 +1,31 @@
|
||||
cac_listservers() {
|
||||
if test -z "${cac_via-}"; then
|
||||
curl -fsS \
|
||||
"https://panel.cloudatcost.com/api/v1/listservers.php?key=$cac_key&login=$cac_login"
|
||||
-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 \
|
||||
"https://panel.cloudatcost.com/api/v1/listservers.php?key=$cac_key\\&login=$cac_login"
|
||||
-G \
|
||||
--data-urlencode key="$cac_key" \
|
||||
--data-urlencode login="$cac_login" \
|
||||
'https://panel.cloudatcost.com/api/v1/listservers.php'
|
||||
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"
|
||||
-G \
|
||||
--data-urlencode key="$cac_key" \
|
||||
--data-urlencode login="$cac_login" \
|
||||
'https://panel.cloudatcost.com/api/v1/listtasks.php'
|
||||
else
|
||||
ssh -q $cac_via -t curl -fsS \
|
||||
"https://panel.cloudatcost.com/api/v1/listtasks.php?key=$cac_key\\&login=$cac_login"
|
||||
-G \
|
||||
--data-urlencode key="$cac_key" \
|
||||
--data-urlencode login="$cac_login" \
|
||||
'https://panel.cloudatcost.com/api/v1/listtasks.php'
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user