alert_pushover.sh 580 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # LinuxGSM alert_pushover.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. # Description: Sends Pushover alert.
  6. local commandname="ALERT"
  7. local commandaction="Alert"
  8. local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
  9. json=$(cat <<EOF
  10. {
  11. "token": "KzGDORePKggMaC0QOYAMyEEuzJnyUi",
  12. "user": "e9e1495ec75826de5983cd1abc8031",
  13. "device": "all",
  14. "title": "Backup finished - SQL1",
  15. "message": "TEST"
  16. EOF
  17. )
  18. curl -sSL -H "Content-Type: application/json" -X POST -d """${json}""" "https://api.pushover.net/1/messages.json"