summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cac.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/cac.sh b/lib/cac.sh
index 723c73769..47b73240a 100644
--- a/lib/cac.sh
+++ b/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
}