|
|
@@ -174,7 +174,7 @@ fn_monitor_check_update_source() {
|
|
|
}
|
|
|
|
|
|
fn_monitor_check_session() {
|
|
|
- fn_print_dots "Checking session:"
|
|
|
+ fn_print_dots "Checking session"
|
|
|
fn_print_checking_eol
|
|
|
fn_script_log_info "Checking session: CHECKING"
|
|
|
# Tmux session width and height needs to be reviewed as may no longer be required.
|
|
|
@@ -211,7 +211,7 @@ fn_monitor_check_session() {
|
|
|
command_restart.sh
|
|
|
core_exit.sh
|
|
|
elif [ "${status}" != "0" ]; then
|
|
|
- fn_print_ok "Checking session:"
|
|
|
+ fn_print_ok "Checking session"
|
|
|
fn_print_ok_eol_nl
|
|
|
fn_script_log_pass "Checking session: OK"
|
|
|
# send LinuxGSM stats if monitor is OK.
|
|
|
@@ -219,7 +219,7 @@ fn_monitor_check_session() {
|
|
|
info_stats.sh
|
|
|
fi
|
|
|
else
|
|
|
- fn_print_error "Checking session:"
|
|
|
+ fn_print_error "Checking session"
|
|
|
fn_print_fail_eol_nl
|
|
|
fn_script_log_fail "Checking session: FAIL"
|
|
|
alert="monitor-session"
|
|
|
@@ -266,12 +266,12 @@ fn_monitor_query() {
|
|
|
totalseconds=0
|
|
|
for queryattempt in {1..5}; do
|
|
|
for queryip in "${queryips[@]}"; do
|
|
|
- fn_print_dots "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}:"
|
|
|
+ fn_print_dots "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}"
|
|
|
fn_print_querying_eol
|
|
|
fn_script_log_info "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : QUERYING"
|
|
|
# querydelay
|
|
|
if [ "$(head -n 1 "${lockdir}/${selfname}-started.lock")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then
|
|
|
- fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}:"
|
|
|
+ fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}"
|
|
|
fn_print_delay_eol_nl
|
|
|
fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY"
|
|
|
fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago"
|
|
|
@@ -293,7 +293,7 @@ fn_monitor_query() {
|
|
|
|
|
|
if [ "${querystatus}" == "0" ]; then
|
|
|
# Server query OK.
|
|
|
- fn_print_ok "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}:"
|
|
|
+ fn_print_ok "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}"
|
|
|
fn_print_ok_eol_nl
|
|
|
fn_script_log_pass "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : OK"
|
|
|
monitorpass=1
|
|
|
@@ -323,14 +323,14 @@ fn_monitor_query() {
|
|
|
core_exit.sh
|
|
|
else
|
|
|
# Server query FAIL.
|
|
|
- fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}:"
|
|
|
+ fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}"
|
|
|
fn_print_fail_eol
|
|
|
fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : FAIL"
|
|
|
# Monitor will try gamedig (if supported) for first 30s then gsquery before restarting.
|
|
|
# gsquery will fail if longer than 60s
|
|
|
if [ "${totalseconds}" -ge "59" ]; then
|
|
|
# Monitor will FAIL if over 60s and trigger gane server reboot.
|
|
|
- fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}:"
|
|
|
+ fn_print_fail "Querying port: ${querymethod}: ${queryip}:${queryport} : ${totalseconds}/${queryattempt}"
|
|
|
fn_print_fail_eol_nl
|
|
|
fn_script_log_warn "Querying port: ${querymethod}: ${queryip}:${queryport} : ${queryattempt} : FAIL"
|
|
|
# Send alert if enabled.
|