@@ -12,8 +12,12 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
1212fn_firstcommand_set
1313
1414fn_monitor_check_monitoring () {
15- # Monitor does not run if lockfile is not found.
16- if [ ! -f " ${lockdir} /${selfname} -monitoring.lock" ]; then
15+ if [ -f " ${lockdir} /${selfname} .lock" ]; then
16+ # Part of migration to v23.5.0. #4296
17+ rm -f " ${lockdir:? } /${selfname} .lock"
18+ date ' +%s' > " ${lockdir:? } /${selfname} -monitoring.lock"
19+ elif [ ! -f " ${lockdir} /${selfname} -monitoring.lock" ]; then
20+ # Monitor does not run if lockfile is not found.
1721 fn_print_dots " Checking lockfile: "
1822 fn_print_checking_eol
1923 fn_script_log_info " Checking lockfile: CHECKING"
@@ -167,7 +171,7 @@ fn_monitor_check_session() {
167171 sessionheight=" 23"
168172 # Check for PIDS with identical tmux sessions running.
169173 if [ " $( pgrep -fcx " tmux -L ${socketname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname} " ) " -ge " 2" ]; then
170- fn_print_error " Checking session: "
174+ fn_print_error " Checking session: There are PIDS with identical tmux sessions running: "
171175 fn_print_error_eol_nl
172176 fn_script_log_error " Checking session: ERROR"
173177 fn_script_log_error " Checking session: There are PIDS with identical tmux sessions running"
@@ -177,7 +181,7 @@ fn_monitor_check_session() {
177181 core_exit.sh
178182 # Check for tmux pids with the same tmux session and socket names. This will reduce issues with migration to release v23.5.0. #4296
179183 elif [ " $( pgrep -fc -u " ${USER} " " tmux -L ${sessionname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname} " ) " != " 0" ]; then
180- fn_print_error " Checking session: "
184+ fn_print_error " Checking session: PIDS with the same tmux session and socket names are running: "
181185 fn_print_error_eol_nl
182186 fn_script_log_error " Checking session: ERROR"
183187 fn_script_log_error " Checking session: PIDS with the same tmux session and socket names are running"
0 commit comments