Daniel Gibbs
4 years ago
No known key found for this signature in database
GPG Key ID: 2EBB36015C6D78E2
2 changed files with
2 additions and
2 deletions
-
lgsm/functions/alert_pushover.sh
-
lgsm/functions/alert_telegram.sh
|
|
@ -22,7 +22,7 @@ else |
|
|
|
alertpriority="0" |
|
|
|
fi |
|
|
|
|
|
|
|
pushoversend=$(curl --connect-timeout 10 -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}" -F priority="${alertpriority}" -F title="${alertemoji} ${alerttitle} ${alertemoji}" -F message="Server name<br>${servername}<br><br>Trigger Message<br>${alerttriggermessage}<br><br>Game<br>${gamename}<br><br>Current Players<br>${alertplayers}<br><br>Map<br>${alertmap}<br><br>Server IP<br>${alertip}:${port}<br><br>Hostname<br>${HOSTNAME}<br><br>Version<br>${alertversion}<br><br>More info<br>${alerturl}" "https://api.pushover.net/1/messages.json" | grep errors) |
|
|
|
pushoversend=$(curl --connect-timeout 10 -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}" -F priority="${alertpriority}" -F title="${alertemoji} ${alerttitle} ${alertemoji}" -F message="<b>Server name</b><br>${servername}<br><br><b>Trigger Message</b><br>${alerttriggermessage}<br><br><b>Game</b><br>${gamename}<br><br><b>Current Players</b><br>${alertplayers}<br><br><b>Map</b><br>${alertmap}<br><br><b>Server IP</b><br>${alertip}:${port}<br><br><b>Hostname</b><br>${HOSTNAME}<br><br><b>Version</b><br>${alertversion}<br><br><b>More info</b><br>${alerturl}" "https://api.pushover.net/1/messages.json" | grep errors) |
|
|
|
|
|
|
|
if [ -n "${pushoversend}" ]; then |
|
|
|
fn_print_fail_nl "Sending Pushover alert: ${pushoversend}" |
|
|
|
|
|
@ -11,7 +11,7 @@ json=$(cat <<EOF |
|
|
|
{ |
|
|
|
"chat_id": "${telegramchatid}", |
|
|
|
"parse_mode": "HTML", |
|
|
|
"text": "<b>${alertemoji} ${alertsubject} ${alertemoji}</b>\n\n<b>Server name</b>\n${servername}\n\n<b>Message</b>\n${alertbody}\n\n<b>Game</b>\n${gamename}\n\n<b>Server IP</b>\n<a href='https://www.gametracker.com/server_info/${alertip}:${port}'>${alertip}:${port}</a>\n\n<b>Hostname</b>\n${HOSTNAME}\n\n<b>More info</b>\n<a href='${alerturl}'>${alerturl}</a>", |
|
|
|
"text": "<b>${alertemoji} ${alertsubject} ${alertemoji}</b>\<br><br><b>Server name</b><br>${servername}<br><br><b>Trigger Message</b><br>${alerttriggermessage}<br><br><b>Game</b><br>${gamename}<br><br><b>Current Players</b><br>${alertplayers}<br><br><b>Map</b><br>${alertmap}<br><br><b>Server IP</b><br>${alertip}:${port}<br><br><b>Hostname</b><br>${HOSTNAME}<br><br><b>Version</b><br>${alertversion}<br><br><b>More info</b><br>${alerturl}", |
|
|
|
"disable_web_page_preview": "yes" |
|
|
|
} |
|
|
|
EOF |
|
|
|