summaryrefslogtreecommitdiff
path: root/e3372-dataswitch-off.sh
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-03-22 23:25:34 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-03-22 23:25:39 +0300
commit91b6b387e19ad2b2f686e8a27bfc0a027e9eb4d9 (patch)
tree2be275e79d58e8f8f69166086c11ca3cbe1d9ed3 /e3372-dataswitch-off.sh
parentc8fb7cd3987d3128bcee5962a5af4cd282add24e (diff)
eliminate a lot of copypasta by using functions
Diffstat (limited to 'e3372-dataswitch-off.sh')
-rwxr-xr-xe3372-dataswitch-off.sh10
1 files changed, 2 insertions, 8 deletions
diff --git a/e3372-dataswitch-off.sh b/e3372-dataswitch-off.sh
index 83ae7e0..446708a 100755
--- a/e3372-dataswitch-off.sh
+++ b/e3372-dataswitch-off.sh
@@ -4,11 +4,5 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
. "$DIR/include.sh"
get_token
-
-curl -s -X POST "http://$MODEM_IP/api/dialup/mobile-dataswitch" \
- -H "Cookie: $COOKIE" \
- -H "__RequestVerificationToken: $TOKEN" \
- -H "Content-Type: text/xml" \
- -d "<request><dataswitch>0</dataswitch></request>" >modem_status.xml
-
-cat modem_status.xml
+post_xml "dialup/mobile-dataswitch" \
+ "<request><dataswitch>0</dataswitch></request>" \ No newline at end of file