Tellme script can now tell if post failed.

This is a very fragile implementation of this, but I didn't want to add
any dependencies to this script since I want it to be able to portable
above all else. If anyone has a better solution I would love to hear it.
This commit is contained in:
James Patrick 2019-11-22 14:57:08 -05:00
parent 73c40c8e4b
commit a1e365546b

View File

@ -38,7 +38,8 @@ curl -s \
--form-string "token=$application_token" \
--form-string "user=$user_token" \
--form-string "message=$message" \
https://api.pushover.net/1/messages.json 1>/dev/null
https://api.pushover.net/1/messages.json \
| grep "\"status\":1," 1>/dev/null
[[ $? -eq 0 ]] && echo "message sent" || echo "ERROR SENDING NOTIFICATION"