Skip to content

Commit 9254d82

Browse files
committed
fix(monitor):correct monitor not picking up date from lock file
1 parent 01f8265 commit 9254d82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lgsm/functions/command_monitor.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ for queryattempt in {1..5}; do
108108
fn_print_querying_eol
109109
fn_script_log_info "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : QUERYING"
110110
# querydelay
111-
if [ "$(cat "${lockdir}/${selfname}.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then
111+
if [ "$(head -n 1 "${lockdir}/${selfname}.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then
112112
fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: "
113113
fn_print_delay_eol_nl
114114
fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY"
115115
fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago"
116-
fn_script_log_info "Server started: $(date -d @$(cat "${lockdir}/${selfname}.lock"))"
116+
fn_script_log_info "Server started: $(date -d @$(head -n 1 "${lockdir}/${selfname}.lock"))"
117117
fn_script_log_info "Current time: $(date)"
118118
monitorpass=1
119119
core_exit.sh

0 commit comments

Comments
 (0)