summaryrefslogtreecommitdiff
path: root/e3372-dataswitch-off.sh
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-03-22 21:12:24 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-03-22 21:12:24 +0300
commit9d1232228b9b63f6b20389ac0a481d0eb25713b8 (patch)
treebadd06b54aa71f77ada76e1daff9ef0a0a6d8c49 /e3372-dataswitch-off.sh
parent8f90106ba1f1dcb23086f8c7a31e46143e615f77 (diff)
move MODEM_IP variable to a separate file
Diffstat (limited to 'e3372-dataswitch-off.sh')
-rwxr-xr-x[-rw-r--r--]e3372-dataswitch-off.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/e3372-dataswitch-off.sh b/e3372-dataswitch-off.sh
index 8fcc5a7..369fc1e 100644..100755
--- a/e3372-dataswitch-off.sh
+++ b/e3372-dataswitch-off.sh
@@ -1,6 +1,8 @@
-#!/bin/sh
+#!/bin/bash
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
+. "$DIR/config.sh"
-MODEM_IP="192.168.9.1"
curl -s -X GET "http://$MODEM_IP/api/webserver/SesTokInfo" > ses_tok.xml
COOKIE=`grep "SessionID=" ses_tok.xml | cut -b 10-147`
TOKEN=`grep "TokInfo" ses_tok.xml | cut -b 10-41`