Browse Source

messaging

pull/2971/head
Daniel Gibbs 5 years ago
parent
commit
4c6297186f
  1. 2
      lgsm/functions/command_monitor.sh
  2. 17
      lgsm/functions/command_validate.sh
  3. 6
      lgsm/functions/command_wipe.sh

2
lgsm/functions/command_monitor.sh

@ -107,7 +107,7 @@ for queryattempt in {1..5}; do
fn_print_delay_eol_nl fn_print_delay_eol_nl
fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY" fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY"
fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago" fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago"
fn_script_log_info "Server started: $(date -d @$(cat lgsm/lock/bmdmserver.lock))" fn_script_log_info "Server started: $(date -d @$(cat "${lockdir:?}/${selfname}.lock"))"
fn_script_log_info "Current time: $(date)" fn_script_log_info "Current time: $(date)"
monitorpass=1 monitorpass=1
core_exit.sh core_exit.sh

17
lgsm/functions/command_validate.sh

@ -9,18 +9,18 @@ commandaction="Validating"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_validate(){ fn_validate(){
fn_script_log_warn "Validating server: SteamCMD: Validate might overwrite some customised files" fn_script_log_warn "SteamCMD: Validate might overwrite some customised files"
totalseconds=3 totalseconds=3
for seconds in {3..1}; do for seconds in {3..1}; do
fn_print_warn "Validating server: SteamCMD: Validate might overwrite some customised files: ${totalseconds}" fn_print_warn "SteamCMD: Validate might overwrite some customised files: ${totalseconds}"
totalseconds=$((totalseconds - 1)) totalseconds=$((totalseconds - 1))
sleep 1 sleep 1
if [ "${seconds}" == "0" ]; then if [ "${seconds}" == "0" ]; then
break break
fi fi
done done
fn_print_warn_nl "Validating server: SteamCMD: Validate might overwrite some customised files" fn_print_warn_nl "SteamCMD: Validate might overwrite some customised files"
fn_print_start_nl "Validating server: SteamCMD" fn_print_start_nl "SteamCMD"
fn_script_log_info "Validating server: SteamCMD" fn_script_log_info "Validating server: SteamCMD"
if [ -d "${steamcmddir}" ]; then if [ -d "${steamcmddir}" ]; then
cd "${steamcmddir}" || exit cd "${steamcmddir}" || exit
@ -49,12 +49,12 @@ fn_validate(){
fi fi
exitcode=$? exitcode=$?
fn_print_dots "Validating server: SteamCMD" fn_print_dots "SteamCMD"
if [ "${exitcode}" != "0" ]; then if [ "${exitcode}" != "0" ]; then
fn_print_fail_nl "Validating server: SteamCMD" fn_print_fail_nl "SteamCMD"
fn_script_log_fatal "Validating server: SteamCMD: FAIL" fn_script_log_fatal "Validating server: SteamCMD: FAIL"
else else
fn_print_ok_nl "Validating server: SteamCMD" fn_print_ok_nl "SteamCMD"
fn_script_log_pass "Validating server: SteamCMD: OK" fn_script_log_pass "Validating server: SteamCMD: OK"
fi fi
core_exit.sh core_exit.sh
@ -75,8 +75,7 @@ fn_stop_warning(){
fn_print_warn_nl "this game server will be stopped during validate" fn_print_warn_nl "this game server will be stopped during validate"
} }
fn_print_dots "Validating server" fn_print_dots "SteamCMD"
fn_print_dots "Validating server: SteamCMD"
check.sh check.sh
if [ "${status}" != "0" ]; then if [ "${status}" != "0" ]; then
fn_stop_warning fn_stop_warning

6
lgsm/functions/command_wipe.sh

@ -205,8 +205,8 @@ if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[
else else
fn_wipe_server_files fn_wipe_server_files
fi fi
else fn_print_ok_nl ""
fn_print_info_nl "No data to wipe was found" fn_script_log_pass "Wiping server"
fn_script_log_pass "No data to wipe was found"
fi fi
core_exit.sh core_exit.sh

Loading…
Cancel
Save