aboutsummaryrefslogtreecommitdiff
path: root/e3372-readsms.sh
diff options
context:
space:
mode:
Diffstat (limited to 'e3372-readsms.sh')
-rwxr-xr-xe3372-readsms.sh11
1 files changed, 3 insertions, 8 deletions
diff --git a/e3372-readsms.sh b/e3372-readsms.sh
index c265dfa..cf54c5f 100755
--- a/e3372-readsms.sh
+++ b/e3372-readsms.sh
@@ -4,15 +4,10 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
. "$DIR/include.sh"
get_token
+post_xml "sms/sms-list" "<request><PageIndex>1</PageIndex><ReadCount>10</ReadCount><BoxType>1</BoxType><SortType>0</SortType><Ascending>0</Ascending><UnreadPreferred>1</UnreadPreferred></request>"
-curl -s -X POST "http://$MODEM_IP/api/sms/sms-list" \
- -H "Cookie: $COOKIE" \
- -H "__RequestVerificationToken: $TOKEN" \
- -H "Content-Type: text/xml" \
- -d "<request><PageIndex>1</PageIndex><ReadCount>10</ReadCount><BoxType>1</BoxType><SortType>0</SortType><Ascending>0</Ascending><UnreadPreferred>1</UnreadPreferred></request>" >modem_status.xml
+#cat $STATUS_FILE
-#cat modem_status.xml
-
-message=$(grep -r -E 'Phone|Content' modem_status.xml | sed -e 's/<[^>]*>//g' | sed -e 's/^[ \t]*/------\n/g')
+message=$(grep -r -E 'Phone|Content' $STATUS_FILE | sed -e 's/<[^>]*>//g' | sed -e 's/^[ \t]*/------\n/g')
echo "$message\n------"