| 12345678910111213141516171819202122 |
- #!/bin/bash
- # LGSM alert_pushbullet.sh function
- # Author: Daniel Gibbs
- # Website: https://gameservermanagers.com
- lgsm_version="210516"
- # Description: alerts using pushbullet.
- modulename="Alert"
- function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
- fn_print_dots "Sending Pushbullet alert"
- sleep 1
- pushbulletsend=$(curl --silent -u """${pushbullettoken}"":" -d type="note" -d body="${alertbody}" -d title="${alertsubject}" 'https://api.pushbullet.com/v2/pushes'|grep -o invalid_access_token|uniq)
- if [ "${pushbulletsend}" == "invalid_access_token" ]; then
- fn_print_fail_nl "Sending Pushbullet alert: invalid_access_token"
- fn_script_log "Failure! Sending Pushbullet alert: invalid_access_token"
- else
- fn_print_ok_nl "Sending Pushbullet alert"
- fn_script_log "Complete! Sent Pushbullet alert"
- fi
|