alert_ifttt.sh 544 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # LinuxGSM alert_ifttt.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. # Description: Sends IFTTT 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. "secret": "${pushjettoken}",
  12. "level": "5",
  13. "message": "all",
  14. "link": "https://gameservermanagers.com"
  15. }
  16. EOF
  17. )
  18. curl -sSL -H "Content-Type: application/json" -X POST -d """${json}""" "https://maker.ifttt.com/trigger/{event}/with/key/${ifttttoken}"