Browse Source

remove gsquery after 30 seconds

pull/3015/head
Daniel Gibbs 5 years ago
parent
commit
c858ca2680
  1. 17
      lgsm/functions/command_monitor.sh

17
lgsm/functions/command_monitor.sh

@ -71,11 +71,13 @@ fn_monitor_check_queryport(){
fn_print_checking_eol fn_print_checking_eol
fn_script_log_info "Checking port: CHECKING" fn_script_log_info "Checking port: CHECKING"
if [ -n "${rconenabled}" ]&&[ "${rconenabled}" != "true" ]&&[ ${shortname} == "av" ]; then if [ -n "${rconenabled}" ]&&[ "${rconenabled}" != "true" ]&&[ ${shortname} == "av" ]; then
fn_print_warn "Checking port: Unable to query as rconport, rcon not enabled: " fn_print_warn "Checking port: Unable to query, rcon is not enabled"
fn_script_log_warn "Checking port: Unable to query rconport, rcon not enabled: WARN" fn_print_warn_eol_nl
fn_script_log_warn "Checking port: Unable to query, rcon is not enabled"
else else
fn_print_error "Checking port: Unable to query queryport is not set: " fn_print_error "Checking port: Unable to query, queryport is not set"
fn_script_log_error "Checking port: Unable to query as queryport is not set: ERROR" fn_script_log_error "Checking port: Unable to query, queryport is not set"
fn_print_error_eol_nl
fi fi
core_exit.sh core_exit.sh
fi fi
@ -162,7 +164,6 @@ for queryattempt in {1..5}; do
fn_print_fail_eol fn_print_fail_eol
fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt}: FAIL" fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt}: FAIL"
# Monitor will try gamedig (if supported) for first 30s then gsquery before restarting. # Monitor will try gamedig (if supported) for first 30s then gsquery before restarting.
if [ "${querymethod}" == "gsquery" ]||[ "${querymethod}" == "tcp" ]; then
# gsquery will fail if longer than 60s # gsquery will fail if longer than 60s
if [ "${totalseconds}" -ge "59" ]; then if [ "${totalseconds}" -ge "59" ]; then
# Monitor will FAIL if over 60s and trigger gane server reboot. # Monitor will FAIL if over 60s and trigger gane server reboot.
@ -176,12 +177,6 @@ for queryattempt in {1..5}; do
fn_firstcommand_reset fn_firstcommand_reset
core_exit.sh core_exit.sh
fi fi
elif [ "${querymethod}" == "gamedig" ]; then
# gamedig will fail and try gsquery if longer than 30s
if [ "${totalseconds}" -ge "29" ]; then
break
fi
fi
fi fi
done done
# Second counter will wait for 15s before breaking loop. # Second counter will wait for 15s before breaking loop.

Loading…
Cancel
Save