From 26a1f4992f88771a521e101576a06fccca67fded Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 16 Dec 2017 20:08:09 +0000 Subject: [PATCH] Will send alert if _default.cfg has changed --- lgsm/functions/alert.sh | 11 +++++++++++ lgsm/functions/command_update_linuxgsm.sh | 2 ++ 2 files changed, 13 insertions(+) diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 60baa1ed6..5faa6e2bd 100644 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -71,6 +71,15 @@ fn_alert_permissions(){ alertbody="${servicename} has permissions issues" } +fn_alert_config(){ + fn_script_log_info "Sending alert: New _default.cfg" + alertsubject="Alert - ${servicename} - New _default.cfg" + alertemoji="🎮" + alertsound="1" + alerturl="not enabled" + alertbody="${servicename} has recieved a new _default.cfg. Check file for changes." +} + if [ "${alert}" == "permissions" ]; then fn_alert_permissions elif [ "${alert}" == "restart" ]; then @@ -81,6 +90,8 @@ elif [ "${alert}" == "test" ]; then fn_alert_test elif [ "${alert}" == "update" ]; then fn_alert_update +elif [ "${alert}" == "config" ]; then + fn_alert_config fi # Generate alert log diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index d1cdb8c52..fdd42e361 100644 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -23,6 +23,8 @@ if [ -z "${legacymode}" ];then fn_script_log_info "checking config _default.cfg: UPDATE" rm -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforce" "nomd5" + alert="config" + alert.sh else fn_print_ok_eol_nl fn_script_log_info "checking config _default.cfg: OK"