|
|
@@ -245,6 +245,11 @@ fn_monitor_check_update() {
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
+fn_monitor_check_backup_update() {
|
|
|
+ fn_monitor_check_backup
|
|
|
+ fn_monitor_check_update
|
|
|
+}
|
|
|
+
|
|
|
# Source engine games may display a messages to indicate the server needs restarting.
|
|
|
fn_monitor_check_update_source() {
|
|
|
if [ -f "${consolelogdir}/${selfname}-console.log" ] && [ "${engine}" == "source" ]; then
|
|
|
@@ -278,6 +283,7 @@ fn_monitor_check_session() {
|
|
|
fn_script_log_error "Checking session: There are PIDS with identical tmux sessions running"
|
|
|
fn_script_log_error "Checking session: Killing all tmux sessions with the socketname name ${socketname} and session name ${sessionname}"
|
|
|
pkill -f "tmux -L ${socketname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}"
|
|
|
+ fn_monitor_check_backup_update
|
|
|
command_restart.sh
|
|
|
core_exit.sh
|
|
|
# Check for tmux pids with the same tmux session and socket names. This will reduce issues with migration to release v23.5.0. #4296
|
|
|
@@ -288,6 +294,7 @@ fn_monitor_check_session() {
|
|
|
fn_script_log_error "Checking session: PIDS with the same tmux session and socket names are running"
|
|
|
fn_script_log_error "Checking session: Killing session with the socketname name ${sessionname} and session name ${sessionname}"
|
|
|
pkill -f "^tmux -L ${sessionname} new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}( |$)"
|
|
|
+ fn_monitor_check_backup_update
|
|
|
command_restart.sh
|
|
|
core_exit.sh
|
|
|
# Check for tmux pids that are using the old type of tmux session. This will reduce issues with migration to release v23.5.0. #4296
|
|
|
@@ -298,6 +305,7 @@ fn_monitor_check_session() {
|
|
|
fn_script_log_error "Checking session: PIDS with old type tmux session are running"
|
|
|
fn_script_log_error "Checking session: Killing session with the session name ${sessionname}"
|
|
|
pkill -f "^tmux new-session -d -x ${sessionwidth} -y ${sessionheight} -s ${sessionname}( |$)"
|
|
|
+ fn_monitor_check_backup_update
|
|
|
command_restart.sh
|
|
|
core_exit.sh
|
|
|
elif [ "${status}" != "0" ]; then
|
|
|
@@ -312,6 +320,7 @@ fn_monitor_check_session() {
|
|
|
fn_print_error "Checking session"
|
|
|
fn_print_fail_eol_nl
|
|
|
fn_script_log_fail "Checking session: FAIL"
|
|
|
+ fn_monitor_check_backup_update
|
|
|
alert="monitor-session"
|
|
|
alert.sh
|
|
|
fn_script_log_info "Checking session: Monitor is restarting ${selfname}"
|
|
|
@@ -423,6 +432,7 @@ fn_monitor_query() {
|
|
|
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"
|
|
|
+ fn_monitor_check_backup_update
|
|
|
# Send alert if enabled.
|
|
|
alert="monitor-query"
|
|
|
alert.sh
|