diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh old mode 100755 new mode 100644 index f73cd513d..3ad62d89a --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -21,6 +21,11 @@ fn_alert_log(){ fn_info_message_server_resource fn_info_message_gameserver_resource fn_info_message_gameserver + fn_info_message_script + fn_info_message_backup + fn_info_message_commandlineparms + fn_info_message_ports_edit + fn_info_message_ports fn_info_logs } | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee -a "${alertlog}" > /dev/null 2>&1 } @@ -31,7 +36,7 @@ fn_alert_test(){ alertemoji="๐Ÿšง" alertsound="1" alerturl="not enabled" - alertmessage="Testing LinuxGSM Alert. No action to be taken." + alerttriggermessage="Testing LinuxGSM Alert. No action to be taken." # Green alertcolourhex="#cdcd00" alertcolourdec="13487360" @@ -43,7 +48,7 @@ fn_alert_restart(){ alertemoji="๐Ÿšจ" alertsound="2" alerturl="not enabled" - alertmessage="${selfname} is not running. Game Server has been restarted." + alerttriggermessage="${selfname} is not running. Game Server has been restarted." # Red alertcolourhex="#cd0000" alertcolourdec="13434880" @@ -55,7 +60,7 @@ fn_alert_restart_query(){ alertemoji="๐Ÿšจ" alertsound="2" alerturl="not enabled" - alertmessage="Unable to query ${selfname}. Game server has been restarted" + alerttriggermessage="Unable to query ${selfname}. Game server has been restarted." # Red alertcolourhex="#cd0000" alertcolourdec="13434880" @@ -64,10 +69,10 @@ fn_alert_restart_query(){ fn_alert_update(){ fn_script_log_info "Sending alert: Updated: ${selfname}" alerttitle="Alert - ${selfname} - Updated" - alertemoji="๐ŸŽฎ" + alertemoji="๐ŸŽ‰" alertsound="1" alerturl="not enabled" - alertmessage="${selfname} has received an update" + alerttriggermessage="${selfname} has received an update." # Green alertcolourhex="#00cd00" alertcolourdec="52480" @@ -76,10 +81,10 @@ fn_alert_update(){ fn_alert_check_update(){ fn_script_log_info "Sending alert: Update available" alerttitle="Alert - ${selfname} - Update available" - alertemoji="๐ŸŽฎ" + alertemoji="๐Ÿ’ฟ" alertsound="1" alerturl="not enabled" - alertmessage="Update availablefor ${selfname}" + alerttriggermessage="Update available for ${selfname}." # Blue alertcolourhex="#1e90ff" alertcolourdec="2003199" @@ -91,7 +96,7 @@ fn_alert_permissions(){ alertemoji="โ—" alertsound="2" alerturl="not enabled" - alertmessage="${selfname} has permissions issues" + alerttriggermessage="${selfname} has permissions issues." # Red alertcolourhex="#cd0000" alertcolourdec="13434880" @@ -103,7 +108,7 @@ fn_alert_config(){ alertemoji="๐Ÿ“„" alertsound="1" alerturl="not enabled" - alertmessage="${selfname} has received a new _default.cfg. Check file for changes." + alerttriggermessage="${selfname} has received a new _default.cfg. Check file for changes." # Blue alertcolourhex="#1e90ff" alertcolourdec="2003199" @@ -112,10 +117,10 @@ fn_alert_config(){ fn_alert_wipe(){ fn_script_log_info "Sending alert: Wiped: ${selfname} wiped" alerttitle="Alert - ${selfname} - Wiped" - alertemoji="๐Ÿ’ฟ" + alertemoji="๐Ÿงน" alertsound="1" alerturl="not enabled" - alertmessage="${selfname} as been wiped." + alerttriggermessage="${selfname} as been wiped." # Green alertcolourhex="#00cd00" alertcolourdec="52480" diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh index dfb1d46ed..e5995084e 100755 --- a/lgsm/functions/alert_discord.sh +++ b/lgsm/functions/alert_discord.sh @@ -55,8 +55,8 @@ json=$(cat <${servername}

Message
${alertmessage}

Game
${gamename}

${alertplayerstitle}
${alertplayers}

Map
${alertmap}

Server IP
${alertip}:${port}

Hostname
${HOSTNAME}

More info
${alerturl}" + "value3": "Server name
${servername}

Trigger Message
${alerttriggermessage}

Game
${gamename}

${alertplayerstitle}
${alertplayers}

Map
${alertmap}

Server IP
${alertip}:${port}

Hostname
${HOSTNAME}

More info
${alerturl}" } EOF ) diff --git a/lgsm/functions/alert_pushbullet.sh b/lgsm/functions/alert_pushbullet.sh index cea5f85d1..0ed6ee92f 100755 --- a/lgsm/functions/alert_pushbullet.sh +++ b/lgsm/functions/alert_pushbullet.sh @@ -12,13 +12,13 @@ json=$(cat <${alertemoji} ${alertsubject} ${alertemoji}\n\nServer name\n${servername}\n\nMessage\n${alertbody}\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\nTrigger Message\n${alerttriggermessage}\n\nGame\n${gamename}\n\nCurrent Players\n${alertplayers}\n\nMap\n${alertmap}\n\nServer IP\n${alertip}:${port}\n\nHostname\n${HOSTNAME}\n\nVersion\n${alertversion}\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 f3a8342a6..5947e34ee 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -59,20 +59,29 @@ fn_info_message_head(){ echo -e "" echo -e "${lightyellow}Alert Summary${default}" fn_messages_separator - echo -e "Message" - echo -e "${alertmessage}" + echo -e "Server name" + echo -e "${servername}" + echo -e "" + echo -e "Trigger Message" + echo -e "${alerttriggermessage}" echo -e "" echo -e "Game" echo -e "${gamename}" echo -e "" - echo -e "Server name" - echo -e "${servername}" + echo -e "Current Players" + echo -e "${alertplayers}" + echo -e "" + echo -e "Map" + echo -e "${alertmap}" + echo -e "" + echo -e "Server IP" + echo -e "${alertip}:${port}" echo -e "" echo -e "Hostname" echo -e "${HOSTNAME}" echo -e "" - echo -e "Server IP" - echo -e "${ip}:${port}" + echo -e "Version" + echo -e "${alertversion}" } fn_info_message_distro(){