@@ -12,8 +12,12 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
12
12
fn_firstcommand_set
13
13
14
14
fn_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.
17
21
fn_print_dots " Checking lockfile: "
18
22
fn_print_checking_eol
19
23
fn_script_log_info " Checking lockfile: CHECKING"
@@ -167,7 +171,7 @@ fn_monitor_check_session() {
167
171
sessionheight=" 23"
168
172
# Check for PIDS with identical tmux sessions running.
169
173
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: "
171
175
fn_print_error_eol_nl
172
176
fn_script_log_error " Checking session: ERROR"
173
177
fn_script_log_error " Checking session: There are PIDS with identical tmux sessions running"
@@ -177,7 +181,7 @@ fn_monitor_check_session() {
177
181
core_exit.sh
178
182
# Check for tmux pids with the same tmux session and socket names. This will reduce issues with migration to release v23.5.0. #4296
179
183
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: "
181
185
fn_print_error_eol_nl
182
186
fn_script_log_error " Checking session: ERROR"
183
187
fn_script_log_error " Checking session: PIDS with the same tmux session and socket names are running"
0 commit comments