mv cac_listservers from infest to lib/cac.sh
This commit is contained in:
parent
3120446d3c
commit
a145561ece
12
infest
12
infest
|
@ -2,6 +2,7 @@
|
||||||
set -xeuf
|
set -xeuf
|
||||||
|
|
||||||
. ./lib/prelude.sh
|
. ./lib/prelude.sh
|
||||||
|
. ./lib/cac.sh
|
||||||
|
|
||||||
nix_url=https://nixos.org/releases/nix/nix-1.8/nix-1.8-x86_64-linux.tar.bz2
|
nix_url=https://nixos.org/releases/nix/nix-1.8/nix-1.8-x86_64-linux.tar.bz2
|
||||||
nix_sha256=52fab207b4ce4d098a12d85357d0353e972c492bab0aa9e08e1600363e76fefb
|
nix_sha256=52fab207b4ce4d098a12d85357d0353e972c492bab0aa9e08e1600363e76fefb
|
||||||
|
@ -49,17 +50,6 @@ main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
infest_centos7_64bit() {
|
infest_centos7_64bit() {
|
||||||
config=$1
|
config=$1
|
||||||
address=$(echo $config | jq -r .ip)
|
address=$(echo $config | jq -r .ip)
|
||||||
|
|
9
lib/cac.sh
Normal file
9
lib/cac.sh
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user