From 0d5272dec81c6924ce55babd2a1a36c0b2ffb708 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Thu, 10 Aug 2017 17:09:59 +0100 Subject: fixing IP choices --- tools/boca-auth-runs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'tools/boca-auth-runs') diff --git a/tools/boca-auth-runs b/tools/boca-auth-runs index b4a3d8f..a7e32bf 100755 --- a/tools/boca-auth-runs +++ b/tools/boca-auth-runs @@ -5,9 +5,6 @@ if [ "`id -u`" != "0" ]; then exit 1 fi -if [ "$BOCASERVER" == "" ]; then - BOCASERVER=50.116.19.221 -fi user="$1" if [ "$user" == "" ]; then echo "parameter user missing. Usage: $0 []" @@ -15,7 +12,20 @@ if [ "$user" == "" ]; then fi if [ "$2" != "" ]; then BOCASERVER=$2 +else + if [[ ! -e /etc/bocaip ]] ; then + echo "O IP do servidor boca nao configurado. Usando bombonera.org" + BOCASERVER=50.116.19.221 + else + source /etc/bocaip + BOCASERVER=$BOCAIP + fi fi +if [ "$BOCASERVER" == "" ]; then + echo "BOCA server not defined. Aborting" + exit 1 +fi + echo "Server at $BOCASERVER" read -s -p "Password: " pass -- cgit v1.2.3