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() {
|
cac_listservers() {
|
||||||
if test -z "${cac_via-}"; then
|
if test -z "${cac_via-}"; then
|
||||||
curl -fsS \
|
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
|
else
|
||||||
ssh -q $cac_via -t curl -fsS \
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
cac_listtasks() {
|
cac_listtasks() {
|
||||||
if test -z "${cac_via-}"; then
|
if test -z "${cac_via-}"; then
|
||||||
curl -fsS \
|
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
|
else
|
||||||
ssh -q $cac_via -t curl -fsS \
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user