Daniel Gibbs
7 months ago
No known key found for this signature in database
GPG Key ID: 2076B128385E8C55
7 changed files with
41 additions and
42 deletions
-
lgsm/modules/alert_discord.sh
-
lgsm/modules/alert_gotify.sh
-
lgsm/modules/alert_ifttt.sh
-
lgsm/modules/alert_pushbullet.sh
-
lgsm/modules/alert_rocketchat.sh
-
lgsm/modules/alert_slack.sh
-
lgsm/modules/alert_telegram.sh
|
|
@ -86,8 +86,7 @@ jsonnoinfo=$( |
|
|
|
"inline": true |
|
|
|
}, |
|
|
|
EOF |
|
|
|
) |
|
|
|
fi |
|
|
|
) |
|
|
|
|
|
|
|
json+=$( |
|
|
|
cat << EOF |
|
|
|
|
|
@ -10,8 +10,8 @@ module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
json=$( |
|
|
|
cat << EOF |
|
|
|
{ |
|
|
|
"title": "${alerttitle}", |
|
|
|
"message": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n |
|
|
|
"title": "${alerttitle}", |
|
|
|
"message": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n |
|
|
|
EOF |
|
|
|
) |
|
|
|
|
|
|
@ -34,7 +34,7 @@ fi |
|
|
|
json+=$( |
|
|
|
cat << EOF |
|
|
|
Server Time\n$(date)", |
|
|
|
"priority": 5 |
|
|
|
"priority": 5 |
|
|
|
} |
|
|
|
EOF |
|
|
|
) |
|
|
|
|
|
@ -10,9 +10,9 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
json=$( |
|
|
|
cat << EOF |
|
|
|
{ |
|
|
|
"value1": "${selfname}", |
|
|
|
"value2": "${alerttitle}", |
|
|
|
"value3": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n |
|
|
|
"value1": "${selfname}", |
|
|
|
"value2": "${alerttitle}", |
|
|
|
"value3": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n |
|
|
|
EOF |
|
|
|
) |
|
|
|
|
|
|
|
|
|
@ -10,10 +10,10 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
json=$( |
|
|
|
cat << EOF |
|
|
|
{ |
|
|
|
"channel_tag": "${channeltag}", |
|
|
|
"type": "note", |
|
|
|
"title": "${alerttitle}", |
|
|
|
"body": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n |
|
|
|
"channel_tag": "${channeltag}", |
|
|
|
"type": "note", |
|
|
|
"title": "${alerttitle}", |
|
|
|
"body": "Server Name\n${servername}\n\nInformation\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\n |
|
|
|
EOF |
|
|
|
) |
|
|
|
|
|
|
|
|
|
@ -67,11 +67,11 @@ EOF |
|
|
|
if [ -n "${querytype}" ]; then |
|
|
|
json+=$( |
|
|
|
cat << EOF |
|
|
|
{ |
|
|
|
"short": false, |
|
|
|
"title": "Is my Game Server Online?", |
|
|
|
"value": "<https://ismygameserver.online/${querytype}/${alertip}:${queryport}|Check here>" |
|
|
|
}, |
|
|
|
{ |
|
|
|
"short": false, |
|
|
|
"title": "Is my Game Server Online?", |
|
|
|
"value": "<https://ismygameserver.online/${querytype}/${alertip}:${queryport}|Check here>" |
|
|
|
}, |
|
|
|
EOF |
|
|
|
) |
|
|
|
fi |
|
|
@ -79,11 +79,11 @@ fi |
|
|
|
if [ -n "${alerturl}" ]; then |
|
|
|
json+=$( |
|
|
|
cat << EOF |
|
|
|
{ |
|
|
|
"short": false, |
|
|
|
"title": "More info", |
|
|
|
"value": "${alerturl}" |
|
|
|
}, |
|
|
|
{ |
|
|
|
"short": false, |
|
|
|
"title": "More info", |
|
|
|
"value": "${alerturl}" |
|
|
|
}, |
|
|
|
EOF |
|
|
|
) |
|
|
|
fi |
|
|
|
|
|
@ -90,13 +90,13 @@ EOF |
|
|
|
if [ -n "${querytype}" ]; then |
|
|
|
json+=$( |
|
|
|
cat << EOF |
|
|
|
{ |
|
|
|
"type": "section", |
|
|
|
"text": { |
|
|
|
"type": "mrkdwn", |
|
|
|
"text": "*Is my Game Server Online?*\n<https://ismygameserver.online/${querytype}/${alertip}:${queryport}|Check here>" |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
"type": "section", |
|
|
|
"text": { |
|
|
|
"type": "mrkdwn", |
|
|
|
"text": "*Is my Game Server Online?*\n<https://ismygameserver.online/${querytype}/${alertip}:${queryport}|Check here>" |
|
|
|
} |
|
|
|
}, |
|
|
|
EOF |
|
|
|
) |
|
|
|
fi |
|
|
@ -104,13 +104,13 @@ fi |
|
|
|
if [ -n "${alerturl}" ]; then |
|
|
|
json+=$( |
|
|
|
cat << EOF |
|
|
|
{ |
|
|
|
"type": "section", |
|
|
|
"text": { |
|
|
|
"type": "mrkdwn", |
|
|
|
"text": "*More info*\n<${alerturl}|${alerturl}>" |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
"type": "section", |
|
|
|
"text": { |
|
|
|
"type": "mrkdwn", |
|
|
|
"text": "*More info*\n<${alerturl}|${alerturl}>" |
|
|
|
} |
|
|
|
}, |
|
|
|
EOF |
|
|
|
) |
|
|
|
fi |
|
|
|
|
|
@ -10,11 +10,11 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
json=$( |
|
|
|
cat << EOF |
|
|
|
{ |
|
|
|
"chat_id": "${telegramchatid}", |
|
|
|
"message_thread_id": "${telegramthreadid}", |
|
|
|
"parse_mode": "HTML", |
|
|
|
"disable_notification": "${telegramdisablenotification}", |
|
|
|
"text": "<b>${alerttitle}</b>\n\n<b>Server name</b>\n${servername}\n\n<b>Information</b>\n${alertmessage}\n\n<b>Game</b>\n${gamename}\n\n<b>Server IP</b>\n${alertip}:${port}\n\n<b>Hostname</b>\n${HOSTNAME}\n\n |
|
|
|
"chat_id": "${telegramchatid}", |
|
|
|
"message_thread_id": "${telegramthreadid}", |
|
|
|
"parse_mode": "HTML", |
|
|
|
"disable_notification": "${telegramdisablenotification}", |
|
|
|
"text": "<b>${alerttitle}</b>\n\n<b>Server name</b>\n${servername}\n\n<b>Information</b>\n${alertmessage}\n\n<b>Game</b>\n${gamename}\n\n<b>Server IP</b>\n${alertip}:${port}\n\n<b>Hostname</b>\n${HOSTNAME}\n\n |
|
|
|
EOF |
|
|
|
) |
|
|
|
|
|
|
@ -37,7 +37,7 @@ fi |
|
|
|
json+=$( |
|
|
|
cat << EOF |
|
|
|
<b>Server Time</b>\n$(date)", |
|
|
|
"disable_web_page_preview": "yes" |
|
|
|
"disable_web_page_preview": "yes" |
|
|
|
} |
|
|
|
EOF |
|
|
|
) |
|
|
|