diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 52d9f57e0..81a15732f 100755 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -27,11 +27,11 @@ fn_alert_log(){ fn_alert_test(){ fn_script_log_info "Sending test alert" - alertsubject="Alert - ${selfname} - Test" + alerttitle="Alert - ${selfname} - Test" alertemoji="🚧" alertsound="1" alerturl="not enabled" - alertdescription="Testing LinuxGSM Alert. No action to be taken." + alertmessage="Testing LinuxGSM Alert. No action to be taken." # Green alertcolourhex="#cdcd00" alertcolourdec="13487360" @@ -39,11 +39,11 @@ fn_alert_test(){ fn_alert_restart(){ fn_script_log_info "Sending alert: Restarted: ${selfname}, ${executable} is not running" - alertsubject="Alert - ${selfname} - Restarted" + alerttitle="Alert - ${selfname} - Restarted" alertemoji="🚨" alertsound="2" alerturl="not enabled" - alertdescription="${selfname} is not running. Game Server has been restarted." + alertmessage="${selfname} is not running. Game Server has been restarted." # Red alertcolourhex="#cd0000" alertcolourdec="13434880" @@ -51,11 +51,11 @@ fn_alert_restart(){ fn_alert_restart_query(){ fn_script_log_info "Sending alert: Restarted: ${selfname}" - alertsubject="Alert - ${selfname} - Restarted" + alerttitle="Alert - ${selfname} - Restarted" alertemoji="🚨" alertsound="2" alerturl="not enabled" - alertdescription="Unable to query ${selfname}. Game server has been restarted" + alertmessage="Unable to query ${selfname}. Game server has been restarted" # Red alertcolourhex="#cd0000" alertcolourdec="13434880" @@ -63,11 +63,11 @@ fn_alert_restart_query(){ fn_alert_update(){ fn_script_log_info "Sending alert: Updated: ${selfname}" - alertsubject="Alert - ${selfname} - Updated" + alerttitle="Alert - ${selfname} - Updated" alertemoji="🎮" alertsound="1" alerturl="not enabled" - alertdescription="${selfname} has received an update" + alertmessage="${selfname} has received an update" # Green alertcolourhex="#00cd00" alertcolourdec="52480" @@ -75,11 +75,11 @@ fn_alert_update(){ fn_alert_check_update(){ fn_script_log_info "Sending alert: Update available" - alertsubject="Alert - ${selfname} - Update available" + alerttitle="Alert - ${selfname} - Update available" alertemoji="🎮" alertsound="1" alerturl="not enabled" - alertdescription="Update availablefor ${selfname}" + alertmessage="Update availablefor ${selfname}" # Blue alertcolourhex="#1e90ff" alertcolourdec="2003199" @@ -87,11 +87,11 @@ fn_alert_check_update(){ fn_alert_permissions(){ fn_script_log_info "Sending alert: Permissions error" - alertsubject="Alert - ${selfname}: Permissions error" + alerttitle="Alert - ${selfname}: Permissions error" alertemoji="❗" alertsound="2" alerturl="not enabled" - alertdescription="${selfname} has permissions issues" + alertmessage="${selfname} has permissions issues" # Red alertcolourhex="#cd0000" alertcolourdec="13434880" @@ -99,11 +99,11 @@ fn_alert_permissions(){ fn_alert_config(){ fn_script_log_info "Sending alert: New _default.cfg" - alertsubject="Alert - ${selfname} - New _default.cfg" + alerttitle="Alert - ${selfname} - New _default.cfg" alertemoji="📄" alertsound="1" alerturl="not enabled" - alertdescription="${selfname} has received a new _default.cfg. Check file for changes." + alertmessage="${selfname} has received a new _default.cfg. Check file for changes." # Blue alertcolourhex="#1e90ff" alertcolourdec="2003199" @@ -111,11 +111,11 @@ fn_alert_config(){ fn_alert_wipe(){ fn_script_log_info "Sending alert: Wiped: ${selfname} wiped" - alertsubject="Alert - ${selfname} - Wiped" + alerttitle="Alert - ${selfname} - Wiped" alertemoji="💿" alertsound="1" alerturl="not enabled" - alertdescription="${selfname} as been wiped." + alertmessage="${selfname} as been wiped." # Green alertcolourhex="#00cd00" alertcolourdec="52480" diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh index dd7537be9..dfb1d46ed 100755 --- a/lgsm/functions/alert_discord.sh +++ b/lgsm/functions/alert_discord.sh @@ -21,7 +21,7 @@ json=$(cat <${servername}

Information
${alertdescription}

Game
${gamename}

${alertplayerstitle}
${alertplayers}

Map
${alertmap}

Server IP
${alertip}:${port}

Hostname
${HOSTNAME}

More info
${alerturl}" + "value2": "${alertemoji} ${alerttitle} ${alertemoji}", + "value3": "Server name
${servername}

Message
${alertmessage}

Game
${gamename}

${alertplayerstitle}
${alertplayers}

Map
${alertmap}

Server IP
${alertip}:${port}

Hostname
${HOSTNAME}

More info
${alerturl}" } EOF ) diff --git a/lgsm/functions/alert_mailgun.sh b/lgsm/functions/alert_mailgun.sh index 4a2955104..86e762650 100755 --- a/lgsm/functions/alert_mailgun.sh +++ b/lgsm/functions/alert_mailgun.sh @@ -18,7 +18,7 @@ fn_print_dots "Sending Email alert: Mailgun: ${email}" mailgunsend=$(curl --connect-timeout 10 -s --user "api:${mailguntoken}" \ -F from="LinuxGSM <${mailgunemailfrom}>" \ -F to="LinuxGSM Admin <${mailgunemail}>" \ --F subject="${alertemoji} ${alertsubject} ${alertemoji}" \ +-F subject="${alertemoji} ${alerttitle} ${alertemoji}" \ -F o:tag='alert' \ -F o:tag='LinuxGSM' \ -F text="$(cat "${alertlog}")" "${mailgunapiurl}/v3/${mailgundomain}/messages") diff --git a/lgsm/functions/alert_pushbullet.sh b/lgsm/functions/alert_pushbullet.sh index 80126ac23..cea5f85d1 100755 --- a/lgsm/functions/alert_pushbullet.sh +++ b/lgsm/functions/alert_pushbullet.sh @@ -11,8 +11,8 @@ json=$(cat <${alertemoji} ${alertsubject} ${alertemoji}\n\nServer name\n${servername}\n\nMessage\n${alertdescription}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}", + "text": "${alertemoji} ${alerttitle} ${alertemoji}\n\nServer name\n${servername}\n\nMessage\n${alertmessage}\n\nGame\n${gamename}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nMore info\n${alerturl}", "disable_web_page_preview": "yes", EOF ) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index f7c1bc752..6d4dab087 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -60,7 +60,7 @@ fn_info_message_head(){ echo -e "${lightyellow}Alert Summary${default}" fn_messages_separator echo -e "Message" - echo -e "${alertdescription}" + echo -e "${alertmessage}" echo -e "" echo -e "Game" echo -e "${gamename}"