~fkooman/vpn-maint-scripts

fa76be690f6ea0c86e4707d97c9c4c3779ee8426 — François Kooman 11 months ago a07fe75
use variable for server.list
1 files changed, 6 insertions(+), 5 deletions(-)

M bin/vpn-maint-update-system-multi
M bin/vpn-maint-update-system-multi => bin/vpn-maint-update-system-multi +6 -5
@@ 1,22 1,23 @@
#!/bin/sh

SERVER_LIST_FILE=server.list
REBOOT_TIME_CONTROLLER=180

if [ ! -f "server.list" ]; then
    echo "\"server.list\" not found!"
if [ ! -f "${SERVER_LIST_FILE}" ]; then
    echo "\"${SERVER_LIST_FILE}\" not found!"
    exit 1
fi

# import the "server.list" file
. ./server.list
. ./${SERVER_LIST_FILE}

if [ -z "${CONTROLLER}" ]; then
    echo "\"CONTROLLER\" not set in \"servers.list\""
    echo "\"CONTROLLER\" not set in \"${SERVER_LIST_FILE}\""
    exit 1
fi

if [ -z "${NODES}" ]; then
    echo "\"NODES\" not set in \"servers.list\""
    echo "\"NODES\" not set in \"${SERVER_LIST_FILE}\""
    exit 1
fi