networking-configuration: use lib/cac.sh

This commit is contained in:
tv 2015-05-20 21:01:42 +02:00
parent 5245d6dd95
commit cb8398ada9

View File

@ -1,9 +1,11 @@
#! /bin/sh
#
# usage: with cac ./generate-networking-configuration c838-828 cd
# usage: with cac ./networking-configuration c838-828 cd
#
set -euf
. ./lib/cac.sh
cac_servername=$1
hostname=$2
@ -43,17 +45,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
}
print_networking_configuraton() {
config=$1
address=$(echo $config | jq -r .ip)