diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 397ffdf7f..6de4741b3 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -18,7 +18,7 @@ fn_alert_restart(){ alertbody="${servicename} ${executable} process not running" } -fn_alert_queryrestart(){ +fn_alert_restart_query(){ fn_scriptlog "Sending restart alert: ${gsquerycmd}" alertsubject="LGSM - Restarted - ${servername}" alertbody="Failed to Query: ${gsquerycmd}" @@ -27,13 +27,13 @@ fn_alert_queryrestart(){ fn_alert_update(){ fn_scriptlog "Sending update alert" alertsubject="LGSM - Updated - ${servername}" - alertbody="Recieved update: 154789" + alertbody="${servicename} Recieved update" } if [ "${alert}" == "restart" ]; then fn_alert_restart -elif [ "${alert}" == "queryrestart" ]; then - fn_alert_queryrestart +elif [ "${alert}" == "restartquery" ]; then + fn_alert_restart_query elif [ "${alert}" == "update" ]; then fn_alert_update elif [ "${alert}" == "test" ]; then diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 64d11cf62..31297f644 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -37,15 +37,6 @@ fn_monitor_msg_checking(){ sleep 1 } -fn_monitor_email_alert(){ - # Email will be sent if enabled - if [ "${emailalert}" = "on" ]; then - alertsubject="LGSM - Restarted - ${servername}" - alertbody="${servicename} process not running" - alert.sh - fi -} - fn_monitor_teamspeak3(){ if [ "${status}" != "0" ]; then fn_print_ok "Checking session: " diff --git a/lgsm/functions/monitor_gsquery.sh b/lgsm/functions/monitor_gsquery.sh index 240b0ca0f..971881c0c 100644 --- a/lgsm/functions/monitor_gsquery.sh +++ b/lgsm/functions/monitor_gsquery.sh @@ -69,11 +69,8 @@ if [ "${gsquery}" == "yes" ]; then sleep 1 # Send alert if enabled - if [ "${emailalert}" == "on" ]; then - - alert="queryrestart" - alert.sh - fi + alert="restartquery" + alert.sh fn_restart break fi diff --git a/lgsm/functions/update_check.sh b/lgsm/functions/update_check.sh index d39d8d688..527c0bed0 100644 --- a/lgsm/functions/update_check.sh +++ b/lgsm/functions/update_check.sh @@ -98,6 +98,8 @@ fn_logupdaterequest(){ else update_dl.sh fi + alert="update" + alert.sh else fn_print_ok "Checking for update: Server logs: No update requested" sleep 1 @@ -175,6 +177,8 @@ fn_steamcmdcheck(){ else update_dl.sh fi + alert="update" + alert.sh else echo -e "\n" echo -e "No update available:" @@ -304,6 +308,8 @@ fn_teamspeak3_check(){ update_dl.sh command_start.sh fi + alert="update" + alert.sh else echo -e "\n" echo -e "No update available:"