Você faz o inverso:
$ pushover-notify "This is my message" command arg1 arg2
Seu script pushover-notify
poderia ser algo assim:
#!/bin/sh
TOKEN=your_token
USER=your_user
MSG="$1"
COMMAND="$2"
shift 2
if "$COMMAND" "$@" ; then
# here run your send-message script, with message "$MSG". for example:
curl -s \
-F "token=$TOKEN" \
-F "user=$USER" \
-F "message=$MSG" \
https://api.pushover.net/1/messages
else
# here send some message indicating failure, or don't do anything. for example:
curl -s \
-F "token=$TOKEN" \
-F "user=$USER" \
-F "message=command failed: $COMMAND $@" \
https://api.pushover.net/1/messages
fi