diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index 08329fd5e..78df55330 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -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. diff --git a/lgsm/modules/command_postdetails.sh b/lgsm/modules/command_postdetails.sh index 2d5712976..f9e93be4a 100644 --- a/lgsm/modules/command_postdetails.sh +++ b/lgsm/modules/command_postdetails.sh @@ -6,18 +6,20 @@ # Description: Strips sensitive information out of Details output. commandname="POST-DETAILS" -commandaction="Posting details" +commandaction="Post Details" moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_firstcommand_set -# source all of the modules defined in the details command. -info_messages.sh - fn_bad_postdetailslog() { fn_print_fail_nl "Unable to create temporary file ${postdetailslog}." core_exit.sh } +fn_print_header + +# source all of the modules defined in the details command. +info_messages.sh + # Remove any existing postdetails.log file. if [ -f "${postdetailslog}" ]; then rm -f "${postdetailslog:?}"