From f4988dbaced03bf65810c781013332a13c767ad3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 20 Oct 2023 23:30:47 +0100 Subject: [PATCH] feat: add alert for update and restart if necessary The code change adds an alert for updates and restarts the service if necessary. This ensures that the service is restarted after an update to prevent any issues. --- lgsm/modules/check_last_update.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/modules/check_last_update.sh b/lgsm/modules/check_last_update.sh index 02d17c975..166d80a17 100644 --- a/lgsm/modules/check_last_update.sh +++ b/lgsm/modules/check_last_update.sh @@ -20,6 +20,8 @@ if [ -f "${lockdir}/last-updated.lock" ] && [ "${status}" != "0" ]; then if [ ! -f "${lockdir}/${selfname}-last-started.lock" ] || [ "${laststart}" -lt "${lastupdate}" ]; then fn_print_info "${selfname} has not been restarted since last update" fn_script_log_info "${selfname} has not been restarted since last update" + alert="update" + alert.sh command_restart.sh fn_firstcommand_reset fi