From 5de21291dc8f1c7cb7ba3cb94d4d1a2eb8f8bbc5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 4 Sep 2023 13:33:58 +0100 Subject: [PATCH] refactor: improve logging in command_stop.sh - Changed `fn_script_log_error` to `fn_script_log_info` for consistency - Removed unnecessary empty line --- lgsm/modules/command_stop.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index dc716216f..5fc48c828 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -256,7 +256,7 @@ fn_stop_tmux() { fn_stop_pre_check() { if [ "${status}" == "0" ]; then fn_print_info_nl "${servername} is already stopped" - fn_script_log_error "${servername} is already stopped" + fn_script_log_info "${servername} is already stopped" else # Select graceful shutdown. fn_stop_graceful_select @@ -282,11 +282,10 @@ fn_stop_pre_check rm -f "${lockdir:?}/${selfname}-started.lock" # If user ran the stop command monitor will become disabled. -if [ "${firstcommandname}" == "STOP" ];then +if [ "${firstcommandname}" == "STOP" ]; then rm -f "${lockdir:?}/${selfname}-monitoring.lock" fi - # Remove stopping lockfile. rm -f "${lockdir:?}/${selfname}-stopping.lock"