Skip to content

Commit

Permalink
title
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Oct 17, 2023
1 parent a39e0e0 commit dec428d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
15 changes: 1 addition & 14 deletions lgsm/modules/alert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ fn_alert_test() {
alertaction="Tested"
alertemoji="🚧"
alertsound="1"
alerturl="not enabled"
alertmessage="Testing ${selfname} LinuxGSM Alert. No action to be taken."
# Green
alertcolourhex="#cdcd00"
Expand All @@ -45,7 +44,6 @@ fn_alert_stopped() {
alertaction="Stopped"
alertemoji=""
alertsound="1"
alerturl="not enabled"
alertmessage="${selfname} has stopped."
# Red
alertcolourhex="#cd0000"
Expand All @@ -57,7 +55,6 @@ fn_alert_started() {
alertaction="Started"
alertemoji=""
alertsound="1"
alerturl="not enabled"
alertmessage="${selfname} has started."
# Green
alertcolourhex="#00cd00"
Expand All @@ -69,7 +66,6 @@ fn_alert_restarted() {
alertaction="Restarted"
alertemoji=""
alertsound="1"
alerturl="not enabled"
alertmessage="${selfname} has restarted."
# Green
alertcolourhex="#00cd00"
Expand All @@ -82,7 +78,6 @@ fn_alert_monitor_session() {
alertaction="Restarted"
alertemoji="🚨"
alertsound="2"
alerturl="not enabled"
alertmessage="${selfname} is not running. Game server has been restarted."
# Red
alertcolourhex="#cd0000"
Expand All @@ -94,7 +89,6 @@ fn_alert_monitor_query() {
alertaction="Restarted"
alertemoji="🚨"
alertsound="2"
alerturl="not enabled"
alertmessage="Unable to query ${selfname}. Game server has been restarted."
# Red
alertcolourhex="#cd0000"
Expand All @@ -107,7 +101,6 @@ fn_alert_update() {
alertaction="Updated"
alertemoji="🎉"
alertsound="1"
alerturl="not enabled"
alertmessage="${selfname} has received a game server update: ${localbuild}."
# Green
alertcolourhex="#00cd00"
Expand All @@ -119,7 +112,6 @@ fn_alert_check_update() {
alertaction="Checked for Update"
alertemoji="🎮"
alertsound="1"
alerturl="not enabled"
alertmessage="${gamename} update available: ${remotebuildversion}"
# Blue
alertcolourhex="#1e90ff"
Expand All @@ -131,7 +123,6 @@ fn_alert_update_linuxgsm() {
alertaction="Updated"
alertemoji="🎉"
alertsound="1"
alerturl="not enabled"
alertbody="${gamename} update available"
alertmessage="${selfname} has received an LinuxGSM update."
# Green
Expand All @@ -144,7 +135,6 @@ fn_alert_permissions() {
alertaction="Checked Permissions"
alertemoji=""
alertsound="2"
alerturl="not enabled"
alertmessage="${selfname} has permissions issues."
# Red
alertcolourhex="#cd0000"
Expand All @@ -156,7 +146,6 @@ fn_alert_config() {
alertaction="Updated _default.cfg"
alertemoji="🎮"
alertsound="1"
alerturl="not enabled"
alertmessage="${selfname} has received a new _default.cfg."
# Blue
alertcolourhex="#1e90ff"
Expand All @@ -168,7 +157,6 @@ fn_alert_wipe() {
alertaction="Wiped"
alertemoji="🧹"
alertsound="1"
alerturl="not enabled"
alertmessage="${selfname} has been wiped."
# Blue
alertcolourhex="#1e90ff"
Expand All @@ -181,7 +169,6 @@ fn_alert_info() {
alertaction="Queried"
alertemoji="📄"
alertsound="1"
alerturl="not enabled"
alertmessage="${selfname} info."
# Blue
alertcolourhex="#1e90ff"
Expand Down Expand Up @@ -211,7 +198,7 @@ elif [ "${alert}" == "wipe" ]; then
fn_alert_wipe
fi

alerttitle="LinuxGSM Alert - ${alertaction} - ${servername}"
alerttitle="${alertemoji} ${alertaction} - ${servername} ${alertemoji}"

# Generate alert log.
fn_alert_log
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/alert_discord.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jsoninfo=$(
"url": "",
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg"
},
"title": "${alertemoji} ${alertaction} - ${servername} ${alertemoji}",
"title": "${alerttitle}",
"url": "",
"description": "",
"color": "${alertcolourdec}",
Expand Down
4 changes: 2 additions & 2 deletions lgsm/modules/alert_pushbullet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jsoninfo=$(
{
"channel_tag": "${channeltag}",
"type": "note",
"title": "${alertemoji} ${alerttitle} ${alertemoji}",
"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\nMore info\n${alerturl}"
}
EOF
Expand All @@ -23,7 +23,7 @@ jsonnoinfo=$(
{
"channel_tag": "${channeltag}",
"type": "note",
"title": "${alertemoji} ${alerttitle} ${alertemoji}",
"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}"
}
EOF
Expand Down

0 comments on commit dec428d

Please sign in to comment.