aboutsummaryrefslogtreecommitdiff
path: root/tools/boca-auth-runs
diff options
context:
space:
mode:
authorCassio de Campos <cassiopc@gmail.com>2017-08-10 16:09:59 +0000
committerCassio de Campos <cassiopc@gmail.com>2017-08-10 16:09:59 +0000
commit0d5272dec81c6924ce55babd2a1a36c0b2ffb708 (patch)
tree4310d1a319bb06a2ae7a545d72af5be1a052cb07 /tools/boca-auth-runs
parent67afcabc78ce0603539d43e8c20540912bf3a3b9 (diff)
downloadboca-0d5272dec81c6924ce55babd2a1a36c0b2ffb708.tar.gz
boca-0d5272dec81c6924ce55babd2a1a36c0b2ffb708.zip
fixing IP choices
Diffstat (limited to 'tools/boca-auth-runs')
-rwxr-xr-xtools/boca-auth-runs16
1 files changed, 13 insertions, 3 deletions
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 <user> [<optional-server-address>]"
@@ -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