From 91b6b387e19ad2b2f686e8a27bfc0a027e9eb4d9 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Mon, 22 Mar 2021 23:25:34 +0300 Subject: eliminate a lot of copypasta by using functions --- e3372-dataswitch-on.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'e3372-dataswitch-on.sh') diff --git a/e3372-dataswitch-on.sh b/e3372-dataswitch-on.sh index f270561..9662a7d 100755 --- a/e3372-dataswitch-on.sh +++ b/e3372-dataswitch-on.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 "1" >modem_status.xml - -cat modem_status.xml +post_xml "dialup/mobile-dataswitch" \ + "1" \ No newline at end of file -- cgit v1.2.3