diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index b9061be14..1302d0d99 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -181,7 +181,7 @@ fn_start_tmux() { check.sh # If user ran the start command monitor will become enabled. -if [ -z "${exitbypass}" ]; then +if [ "${firstcommandname}" == "START" ]||[ "${firstcommandname}" == "RESTART" ]; then date '+%s' > "${lockdir:?}/${selfname}-monitoring.lock" fi diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index f1e421579..dc716216f 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -282,7 +282,7 @@ fn_stop_pre_check rm -f "${lockdir:?}/${selfname}-started.lock" # If user ran the stop command monitor will become disabled. -if [ -z "${exitbypass}" ]; then +if [ "${firstcommandname}" == "STOP" ];then rm -f "${lockdir:?}/${selfname}-monitoring.lock" fi