Browse Source

ui tidy

pull/2972/head
Daniel Gibbs 5 years ago
parent
commit
3e30ae205a
  1. 4
      lgsm/functions/command_wipe.sh
  2. 38
      lgsm/functions/core_dl.sh

4
lgsm/functions/command_wipe.sh

@ -203,7 +203,7 @@ if [ "${status}" != "0" ]; then
else else
fn_wipe_server_files fn_wipe_server_files
fi fi
fn_print_complete_nl "" fn_print_complete_nl "Wiping ${selfname}"
fn_script_log_pass "Wiping server" fn_script_log_pass "Wiping ${selfname}"
core_exit.sh core_exit.sh

38
lgsm/functions/core_dl.sh

@ -21,7 +21,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_dl_steamcmd(){ fn_dl_steamcmd(){
fn_print_start_nl "${remotelocation}" fn_print_start_nl "${remotelocation}"
fn_script_log_info "${commandaction} server: ${remotelocation}" fn_script_log_info "${commandaction} ${selfname}: ${remotelocation}"
if [ -n "${branch}" ]; then if [ -n "${branch}" ]; then
echo -e "Branch: ${branch}" echo -e "Branch: ${branch}"
fn_script_log_info "Branch: ${branch}" fn_script_log_info "Branch: ${branch}"
@ -91,43 +91,43 @@ fn_dl_steamcmd(){
if [ -n "$(grep "Error!" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "ERROR!" "${steamcmdlog}" | tail -1)" ]; then if [ -n "$(grep "Error!" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "ERROR!" "${steamcmdlog}" | tail -1)" ]; then
# Not enough space. # Not enough space.
if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then
fn_print_failure_nl "${commandaction} server: ${remotelocation}: Not enough space to download server files" fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough space to download server files"
fn_script_log_fatal "${commandaction} server: ${remotelocation}: Not enough space to download server files" fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough space to download server files"
core_exit.sh core_exit.sh
# Need tp purchase game. # Need tp purchase game.
elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then
fn_print_failure_nl "${commandaction} server: ${remotelocation}: Steam account does not have a license for the required game" fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game"
fn_script_log_fatal "${commandaction} server: ${remotelocation}: Steam account does not have a license for the required game" fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game"
core_exit.sh core_exit.sh
# Two-factor authentication failure # Two-factor authentication failure
elif [ -n "$(grep "Two-factor code mismatch" "${steamcmdlog}" | tail -1)" ]; then elif [ -n "$(grep "Two-factor code mismatch" "${steamcmdlog}" | tail -1)" ]; then
fn_print_failure_nl "${commandaction} server: ${remotelocation}: Two-factor authentication failure" fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure"
fn_script_log_fatal "${commandaction} server: ${remotelocation}: Two-factor authentication failure" fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure"
core_exit.sh core_exit.sh
# Incorrect Branch password # Incorrect Branch password
elif [ -n "$(grep "Password check for AppId" "${steamcmdlog}" | tail -1)" ]; then elif [ -n "$(grep "Password check for AppId" "${steamcmdlog}" | tail -1)" ]; then
fn_print_failure_nl "${commandaction} server: ${remotelocation}: betapassword is incorrect" fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect"
fn_script_log_fatal "${commandaction} server: ${remotelocation}: betapassword is incorrect" fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect"
core_exit.sh core_exit.sh
# Update did not finish. # Update did not finish.
elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then
fn_print_error2_nl "${commandaction} server: ${remotelocation}: Update required but not completed - check network" fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network"
fn_script_log_error "${commandaction} server: ${remotelocation}: Update required but not completed - check network" fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network"
else else
fn_print_error2_nl "${commandaction} server: ${remotelocation}: Unknown error occured" fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured"
fn_script_log_error "${commandaction} server: ${remotelocation}: Unknown error occured" fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured"
fi fi
elif [ "${exitcode}" != "0" ]; then elif [ "${exitcode}" != "0" ]; then
fn_print_error2_nl "${commandaction} server: ${remotelocation}: Exit code: ${exitcode}" fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}"
fn_script_log_error "${commandaction} server: ${remotelocation}: Exit code: ${exitcode}" fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}"
else else
fn_print_complete_nl "${commandaction} server: ${remotelocation}" fn_print_complete_nl "${commandaction} ${selfname}: ${remotelocation}"
fn_script_log_pass "${commandaction} server: ${remotelocation}" fn_script_log_pass "${commandaction} ${selfname}: ${remotelocation}"
fi fi
if [ "${counter}" -gt "10" ]; then if [ "${counter}" -gt "10" ]; then
fn_print_failure_nl "${commandaction} server: ${remotelocation}: Did not complete the download, too many retrys" fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys"
fn_script_log_fatal "${commandaction} server: ${remotelocation}: Did not complete the download, too many retrys" fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys"
core_exit.sh core_exit.sh
fi fi
done done

Loading…
Cancel
Save