summaryrefslogtreecommitdiffstats
path: root/lib/cac.sh
blob: 723c737694b2c447b79fac737af3eb239109b759 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
cac_listservers() {
  if test -z "${cac_via-}"; then
    curl -fsS \
      "https://panel.cloudatcost.com/api/v1/listservers.php?key=$cac_key&login=$cac_login"
  else
    ssh -q $cac_via -t curl -fsS \
      "https://panel.cloudatcost.com/api/v1/listservers.php?key=$cac_key\\&login=$cac_login"
  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
}