diff options
Diffstat (limited to 'e3372-sendsms.sh')
-rwxr-xr-x | e3372-sendsms.sh | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/e3372-sendsms.sh b/e3372-sendsms.sh index 9740775..6b7e3fa 100755 --- a/e3372-sendsms.sh +++ b/e3372-sendsms.sh @@ -3,12 +3,9 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" . "$DIR/include.sh" -get_token +SMS_DATA="<?xml version='1.0' encoding='UTF-8'?><request><Index>-1</Index><Phones><Phone>363</Phone></Phones><Sca></Sca><Content>USAGE</Content><Length>5</Length><Reserved>1</Reserved><Date>-1</Date></request>" -curl -s -X POST "http://$MODEM_IP/api/sms/send-sms" \ - -H "Cookie: $COOKIE" \ - -H "__RequestVerificationToken: $TOKEN" \ - -H "Content-Type: text/xml" \ - -d "<?xml version='1.0' encoding='UTF-8'?><request><Index>-1</Index><Phones><Phone>363</Phone></Phones><Sca></Sca><Content>USAGE</Content><Length>5</Length><Reserved>1</Reserved><Date>-1</Date></request>" >modem_status.xml +get_token +post_xml "sms/send-sms" "$SMS_DATA" > $STATUS_FILE -cat modem_status.xml
\ No newline at end of file +cat $STATUS_FILE
\ No newline at end of file |