diff --git a/lgsm/modules/alert_discord.sh b/lgsm/modules/alert_discord.sh index a384de3db0..f3a79416a9 100644 --- a/lgsm/modules/alert_discord.sh +++ b/lgsm/modules/alert_discord.sh @@ -52,7 +52,7 @@ discordsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" if [ -n "${discordsend}" ]; then fn_print_fail_nl "Sending Discord alert: ${discordsend}" - fn_script_log_fatal "Sending Discord alert: ${discordsend}" + fn_script_log_fail "Sending Discord alert: ${discordsend}" else fn_print_ok_nl "Sending Discord alert" fn_script_log_pass "Sending Discord alert" diff --git a/lgsm/modules/alert_email.sh b/lgsm/modules/alert_email.sh index abe49e2e09..0aca09fef1 100644 --- a/lgsm/modules/alert_email.sh +++ b/lgsm/modules/alert_email.sh @@ -20,5 +20,5 @@ if [ "${exitcode}" == "0" ]; then fn_script_log_pass "Sending Email alert: ${email}" else fn_print_fail_nl "Sending Email alert: ${email}" - fn_script_log_fatal "Sending Email alert: ${email}" + fn_script_log_fail "Sending Email alert: ${email}" fi diff --git a/lgsm/modules/alert_gotify.sh b/lgsm/modules/alert_gotify.sh index ef833ba75b..27e4d34399 100644 --- a/lgsm/modules/alert_gotify.sh +++ b/lgsm/modules/alert_gotify.sh @@ -26,5 +26,5 @@ if [ -n "${gotifysend}" ]; then fn_script_log_pass "Sending Gotify alert" else fn_print_fail_nl "Sending Gotify alert: ${gotifysend}" - fn_script_log_fatal "Sending Gotify alert: ${gotifysend}" + fn_script_log_fail "Sending Gotify alert: ${gotifysend}" fi diff --git a/lgsm/modules/alert_ifttt.sh b/lgsm/modules/alert_ifttt.sh index ae0de8ed6f..c1ccfc9cb7 100644 --- a/lgsm/modules/alert_ifttt.sh +++ b/lgsm/modules/alert_ifttt.sh @@ -22,7 +22,7 @@ iftttsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" - if [ -n "${iftttsend}" ]; then fn_print_fail_nl "Sending IFTTT alert: ${pushbulletsend}" - fn_script_log_fatal "Sending IFTTT alert: ${pushbulletsend}" + fn_script_log_fail "Sending IFTTT alert: ${pushbulletsend}" else fn_print_ok_nl "Sending IFTTT alert" fn_script_log_pass "Sent IFTTT alert" diff --git a/lgsm/modules/alert_mailgun.sh b/lgsm/modules/alert_mailgun.sh index a25c826486..802197a8f2 100644 --- a/lgsm/modules/alert_mailgun.sh +++ b/lgsm/modules/alert_mailgun.sh @@ -25,7 +25,7 @@ mailgunsend=$(curl --connect-timeout 10 -s --user "api:${mailguntoken}" \ if [ -z "${mailgunsend}" ]; then fn_print_fail_nl "Sending Email alert: Mailgun: ${mailgunemail}" - fn_script_log_fatal "Sending Email alert: Mailgun: ${mailgunemail}" + fn_script_log_fail "Sending Email alert: Mailgun: ${mailgunemail}" else fn_print_ok_nl "Sending Email alert: Mailgun: ${mailgunemail}" fn_script_log_pass "Sending Email alert: Mailgun: ${mailgunemail}" diff --git a/lgsm/modules/alert_pushbullet.sh b/lgsm/modules/alert_pushbullet.sh index eec1416110..3bcd6141b0 100644 --- a/lgsm/modules/alert_pushbullet.sh +++ b/lgsm/modules/alert_pushbullet.sh @@ -23,7 +23,7 @@ pushbulletsend=$(curl --connect-timeout 10 -sSL -u """${pushbullettoken}"":" -H if [ -n "${pushbulletsend}" ]; then fn_print_fail_nl "Sending Pushbullet alert: ${pushbulletsend}" - fn_script_log_fatal "Sending Pushbullet alert: ${pushbulletsend}" + fn_script_log_fail "Sending Pushbullet alert: ${pushbulletsend}" else fn_print_ok_nl "Sending Pushbullet alert" fn_script_log_pass "Sent Pushbullet alert" diff --git a/lgsm/modules/alert_pushover.sh b/lgsm/modules/alert_pushover.sh index 608e73c30e..35229094af 100644 --- a/lgsm/modules/alert_pushover.sh +++ b/lgsm/modules/alert_pushover.sh @@ -26,7 +26,7 @@ pushoversend=$(curl --connect-timeout 10 -sS -F token="${pushovertoken}" -F user if [ -n "${pushoversend}" ]; then fn_print_fail_nl "Sending Pushover alert: ${pushoversend}" - fn_script_log_fatal "Sending Pushover alert: ${pushoversend}" + fn_script_log_fail "Sending Pushover alert: ${pushoversend}" else fn_print_ok_nl "Sending Pushover alert" fn_script_log_pass "Sent Pushover alert" diff --git a/lgsm/modules/alert_rocketchat.sh b/lgsm/modules/alert_rocketchat.sh index 875a6ff5df..f6e410ef88 100644 --- a/lgsm/modules/alert_rocketchat.sh +++ b/lgsm/modules/alert_rocketchat.sh @@ -46,5 +46,5 @@ if [ -n "${rocketchatsend}" ]; then fn_script_log_pass "Sending Rocketchat alert" else fn_print_fail_nl "Sending Rocketchat alert: ${rocketchatsend}" - fn_script_log_fatal "Sending Rocketchat alert: ${rocketchatsend}" + fn_script_log_fail "Sending Rocketchat alert: ${rocketchatsend}" fi diff --git a/lgsm/modules/alert_slack.sh b/lgsm/modules/alert_slack.sh index 3bb148828f..f83df95101 100644 --- a/lgsm/modules/alert_slack.sh +++ b/lgsm/modules/alert_slack.sh @@ -71,5 +71,5 @@ if [ "${slacksend}" == "ok" ]; then fn_script_log_pass "Sending Slack alert" else fn_print_fail_nl "Sending Slack alert: ${slacksend}" - fn_script_log_fatal "Sending Slack alert: ${slacksend}" + fn_script_log_fail "Sending Slack alert: ${slacksend}" fi diff --git a/lgsm/modules/alert_telegram.sh b/lgsm/modules/alert_telegram.sh index 77b89560ca..d2e72346a6 100644 --- a/lgsm/modules/alert_telegram.sh +++ b/lgsm/modules/alert_telegram.sh @@ -23,7 +23,7 @@ telegramsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json if [ -n "${telegramsend}" ]; then fn_print_fail_nl "Sending Telegram alert: ${telegramsend}" - fn_script_log_fatal "Sending Telegram alert: ${telegramsend}" + fn_script_log_fail "Sending Telegram alert: ${telegramsend}" else fn_print_ok_nl "Sending Telegram alert" fn_script_log_pass "Sent Telegram alert" diff --git a/lgsm/modules/check_config.sh b/lgsm/modules/check_config.sh index 4f96a8db47..436740afa9 100644 --- a/lgsm/modules/check_config.sh +++ b/lgsm/modules/check_config.sh @@ -28,8 +28,8 @@ fi if [ "${shortname}" == "vh" ] && [ -z "${serverpassword}" ]; then fn_print_fail_nl "serverpassword is not set" - fn_script_log_fatal "serverpassword is not set" + fn_script_log_fail "serverpassword is not set" elif [ "${shortname}" == "vh" ] && [ "${#serverpassword}" -le "4" ]; then fn_print_fail_nl "serverpassword is to short (min 5 chars)" - fn_script_log_fatal "serverpassword is to short (min 5 chars)" + fn_script_log_fail "serverpassword is to short (min 5 chars)" fi diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 96932d34a2..d10948ca53 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -80,7 +80,7 @@ fn_install_mono_repo() { if [ "${monoautoinstall}" != "1" ]; then if [ $? != 0 ]; then fn_print_failure_nl "Unable to install Mono repository." - fn_script_log_fatal "Unable to install Mono repository." + fn_script_log_fail "Unable to install Mono repository." else fn_print_complete_nl "Installing Mono repository completed." fn_script_log_pass "Installing Mono repository completed." @@ -215,7 +215,7 @@ fn_install_missing_deps() { if [ "${steamcmdfail}" ]; then if [ "${commandname}" == "INSTALL" ]; then fn_print_failure_nl "Missing dependencies required to run SteamCMD." - fn_script_log_fatal "Missing dependencies required to run SteamCMD." + fn_script_log_fail "Missing dependencies required to run SteamCMD." core_exit.sh else fn_print_error_nl "Missing dependencies required to run SteamCMD." diff --git a/lgsm/modules/check_executable.sh b/lgsm/modules/check_executable.sh index 6c8feab2a0..91db68f1a3 100644 --- a/lgsm/modules/check_executable.sh +++ b/lgsm/modules/check_executable.sh @@ -20,7 +20,7 @@ if [ ! -f "${executabledir}/${execname}" ]; then fn_print_fail_nl "executable was not found" echo -e "* ${executabledir}/${execname}" if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Executable was not found: ${executabledir}/${execname}" + fn_script_log_fail "Executable was not found: ${executabledir}/${execname}" fi unset exitbypass core_exit.sh diff --git a/lgsm/modules/check_permissions.sh b/lgsm/modules/check_permissions.sh index b5b5d6ec9e..a6a37ce5c6 100644 --- a/lgsm/modules/check_permissions.sh +++ b/lgsm/modules/check_permissions.sh @@ -25,7 +25,7 @@ fn_check_ownership() { fi if [ "${selfownissue}" == "1" ] || [ "${funcownissue}" == "1" ] || [ "${filesownissue}" == "1" ]; then fn_print_fail_nl "Ownership issues found" - fn_script_log_fatal "Ownership issues found" + fn_script_log_fail "Ownership issues found" fn_print_information_nl "The current user ($(whoami)) does not have ownership of the following files:" fn_script_log_info "The current user ($(whoami)) does not have ownership of the following files:" { @@ -56,7 +56,7 @@ fn_check_permissions() { if [ -d "${modulesdir}" ]; then if [ "$(find "${modulesdir}" -type f -not -executable | wc -l)" -ne "0" ]; then fn_print_fail_nl "Permissions issues found" - fn_script_log_fatal "Permissions issues found" + fn_script_log_fail "Permissions issues found" fn_print_information_nl "The following files are not executable:" fn_script_log_info "The following files are not executable:" { @@ -80,7 +80,7 @@ fn_check_permissions() { grouprootdirperm="${rootdirperm:1:1}" if [ "${userrootdirperm}" != "7" ] && [ "${grouprootdirperm}" != "7" ]; then fn_print_fail_nl "Permissions issues found" - fn_script_log_fatal "Permissions issues found" + fn_script_log_fail "Permissions issues found" fn_print_information_nl "The following directory does not have the correct permissions:" fn_script_log_info "The following directory does not have the correct permissions:" fn_script_log_info "${rootdir}" diff --git a/lgsm/modules/check_root.sh b/lgsm/modules/check_root.sh index 063a2b0d30..81115394ad 100644 --- a/lgsm/modules/check_root.sh +++ b/lgsm/modules/check_root.sh @@ -11,7 +11,7 @@ if [ "$(whoami)" == "root" ]; then if [ "${commandname}" != "INSTALL" ]; then fn_print_fail_nl "Do NOT run this script as root!" if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "${selfname} attempted to run as root." + fn_script_log_fail "${selfname} attempted to run as root." else # Forces exit code is log does not yet exist. exitcode=1 diff --git a/lgsm/modules/check_system_dir.sh b/lgsm/modules/check_system_dir.sh index 162037861f..01c6437489 100644 --- a/lgsm/modules/check_system_dir.sh +++ b/lgsm/modules/check_system_dir.sh @@ -10,7 +10,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ ! -d "${serverfiles}" ]; then fn_print_fail_nl "Cannot access ${serverfiles}: No such directory" if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Cannot access ${serverfiles}: No such directory." + fn_script_log_fail "Cannot access ${serverfiles}: No such directory." fi core_exit.sh fi @@ -18,7 +18,7 @@ fi if [ ! -d "${systemdir}" ]; then fn_print_fail_nl "Cannot access ${systemdir}: No such directory" if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Cannot access ${systemdir}: No such directory." + fn_script_log_fail "Cannot access ${systemdir}: No such directory." fi core_exit.sh fi diff --git a/lgsm/modules/check_tmuxception.sh b/lgsm/modules/check_tmuxception.sh index aded5cb2dc..8f1f94c73e 100644 --- a/lgsm/modules/check_tmuxception.sh +++ b/lgsm/modules/check_tmuxception.sh @@ -10,7 +10,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_check_is_in_tmux() { if [ "${TMUX}" ]; then fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a tmux session." - fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a tmux session." + fn_script_log_fail "Tmuxception error: Attempted to start a tmux session inside of a tmux session." fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." echo -e "It is not possible to run a tmux session inside another tmux session" echo -e "https://docs.linuxgsm.com/requirements/tmux#tmuxception" @@ -21,7 +21,7 @@ fn_check_is_in_tmux() { fn_check_is_in_screen() { if [ "${STY}" ]; then fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a screen session." - fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a screen session." + fn_script_log_fail "Tmuxception error: Attempted to start a tmux session inside of a screen session." fn_print_information_nl "LinuxGSM creates a tmux session when starting the server." echo -e "It is not possible to run a tmux session inside screen session" echo -e "https://docs.linuxgsm.com/requirements/tmux#tmuxception" diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index b63c826256..16223c9145 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -148,7 +148,7 @@ fn_backup_compression() { # Check that excludedir is a valid path. if [ ! -d "${excludedir}" ]; then fn_print_fail_nl "Problem identifying the previous backup directory for exclusion." - fn_script_log_fatal "Problem identifying the previous backup directory for exclusion" + fn_script_log_fail "Problem identifying the previous backup directory for exclusion" core_exit.sh fi @@ -156,10 +156,10 @@ fn_backup_compression() { local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol - fn_script_log_fatal "Backup in progress: FAIL" + fn_script_log_fail "Backup in progress: FAIL" echo -e "${extractcmd}" | tee -a "${lgsmlog}" fn_print_fail_nl "Starting backup" - fn_script_log_fatal "Starting backup" + fn_script_log_fail "Starting backup" else fn_print_ok_eol fn_print_ok_nl "Completed: ${backupname}.tar.gz, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')" @@ -217,7 +217,7 @@ fn_backup_relpath() { declare -a rdirtoks=($(readlink -f "${rootdir}" | sed "s/\// /g")) if [ ${#rdirtoks[@]} -eq 0 ]; then fn_print_fail_nl "Problem assessing rootdir during relative path assessment" - fn_script_log_fatal "Problem assessing rootdir during relative path assessment: ${rootdir}" + fn_script_log_fail "Problem assessing rootdir during relative path assessment: ${rootdir}" core_exit.sh fi @@ -225,7 +225,7 @@ fn_backup_relpath() { declare -a bdirtoks=($(readlink -f "${backupdir}" | sed "s/\// /g")) if [ ${#bdirtoks[@]} -eq 0 ]; then fn_print_fail_nl "Problem assessing backupdir during relative path assessment" - fn_script_log_fatal "Problem assessing backupdir during relative path assessment: ${rootdir}" + fn_script_log_fail "Problem assessing backupdir during relative path assessment: ${rootdir}" core_exit.sh fi diff --git a/lgsm/modules/command_dev_detect_glibc.sh b/lgsm/modules/command_dev_detect_glibc.sh index f407bf6faa..214adc88eb 100644 --- a/lgsm/modules/command_dev_detect_glibc.sh +++ b/lgsm/modules/command_dev_detect_glibc.sh @@ -17,7 +17,7 @@ fn_messages_separator if [ ! "$(command -v objdump 2> /dev/null)" ]; then fn_print_failure_nl "objdump is missing" - fn_script_log_fatal "objdump is missing" + fn_script_log_fail "objdump is missing" core_exit.sh fi diff --git a/lgsm/modules/command_fastdl.sh b/lgsm/modules/command_fastdl.sh index c6393fb762..acc3a1ba47 100644 --- a/lgsm/modules/command_fastdl.sh +++ b/lgsm/modules/command_fastdl.sh @@ -26,7 +26,7 @@ luafastdlfullpath="${luasvautorundir}/${luafastdlfile}" # Check if bzip2 is installed. if [ ! "$(command -v bzip2 2> /dev/null)" ]; then fn_print_fail "bzip2 is not installed" - fn_script_log_fatal "bzip2 is not installed" + fn_script_log_fail "bzip2 is not installed" core_exit.sh fi @@ -72,7 +72,7 @@ fn_clear_old_fastdl() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Clearing existing FastDL directory ${fastdldir}" + fn_script_log_fail "Clearing existing FastDL directory ${fastdldir}" core_exit.sh else fn_print_ok_eol_nl @@ -89,7 +89,7 @@ fn_fastdl_dirs() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Creating web directory ${webdir}" + fn_script_log_fail "Creating web directory ${webdir}" core_exit.sh else fn_print_ok_eol_nl @@ -102,7 +102,7 @@ fn_fastdl_dirs() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Creating fastdl directory ${fastdldir}" + fn_script_log_fail "Creating fastdl directory ${fastdldir}" core_exit.sh else fn_print_ok_eol_nl @@ -218,13 +218,13 @@ fn_fastdl_preview() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Calculating total file size." + fn_script_log_fail "Calculating total file size." core_exit.sh fi done < "${tmpdir}/fastdl_files_to_compress.txt" else fn_print_fail_eol_nl "generating file list" - fn_script_log_fatal "Generating file list." + fn_script_log_fail "Generating file list." core_exit.sh fi echo -e "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)" @@ -251,7 +251,7 @@ fn_fastdl_gmod() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}" + fn_script_log_fail "Copying ${fastdlfile} > ${fastdldir}" core_exit.sh else fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}" @@ -268,7 +268,7 @@ fn_fastdl_gmod() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Updating addons file structure" + fn_script_log_fail "Updating addons file structure" core_exit.sh else fn_print_ok_eol_nl @@ -281,7 +281,7 @@ fn_fastdl_gmod() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Clearing addons dir from fastdl dir" + fn_script_log_fail "Clearing addons dir from fastdl dir" core_exit.sh else fn_print_ok_eol_nl @@ -296,7 +296,7 @@ fn_fastdl_gmod() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Correcting DarkRP files" + fn_script_log_fail "Correcting DarkRP files" core_exit.sh else fn_print_ok_eol_nl @@ -347,7 +347,7 @@ fn_fastdl_source() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" + fn_script_log_fail "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" core_exit.sh else fn_script_log_pass "Copying ${fastdlfile} > ${fastdldir}/${copytodir}" @@ -383,7 +383,7 @@ fn_fastdl_gmod_dl_enforcer() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Removing existing download enforcer ${luafastdlfullpath}" + fn_script_log_fail "Removing existing download enforcer ${luafastdlfullpath}" core_exit.sh else fn_print_ok_eol_nl @@ -401,7 +401,7 @@ fn_fastdl_gmod_dl_enforcer() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Creating new download enforcer ${luafastdlfullpath}" + fn_script_log_fail "Creating new download enforcer ${luafastdlfullpath}" core_exit.sh else fn_print_ok_eol_nl @@ -418,7 +418,7 @@ fn_fastdl_bzip2() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Compressing ${filetocompress}" + fn_script_log_fail "Compressing ${filetocompress}" core_exit.sh else fn_script_log_pass "Compressing ${filetocompress}" diff --git a/lgsm/modules/command_mods_remove.sh b/lgsm/modules/command_mods_remove.sh index d12f7075c9..db7763cd8e 100644 --- a/lgsm/modules/command_mods_remove.sh +++ b/lgsm/modules/command_mods_remove.sh @@ -72,7 +72,7 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do rm -rf "${modinstalldir:?}/${currentfileremove:?}" ((exitcode = $?)) if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${modinstalldir}/${currentfileremove}" + fn_script_log_fail "Removing ${modinstalldir}/${currentfileremove}" break else fn_script_log_pass "Removing ${modinstalldir}/${currentfileremove}" @@ -103,7 +103,7 @@ fn_sleep_time rm -rf "${modsdir:?}/${modcommand}-files.txt" exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${modsdir}/${modcommand}-files.txt" + fn_script_log_fail "Removing ${modsdir}/${modcommand}-files.txt" fn_print_fail_eol_nl core_exit.sh else @@ -118,7 +118,7 @@ fn_sleep_time sed -i "/^${modcommand}$/d" "${modsinstalledlistfullpath}" exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${modcommand} from ${modsinstalledlist}" + fn_script_log_fail "Removing ${modcommand} from ${modsinstalledlist}" fn_print_fail_eol_nl core_exit.sh else diff --git a/lgsm/modules/command_mods_update.sh b/lgsm/modules/command_mods_update.sh index b917f191f5..cfbafc80c5 100644 --- a/lgsm/modules/command_mods_update.sh +++ b/lgsm/modules/command_mods_update.sh @@ -97,7 +97,7 @@ while [ "${installedmodsline}" -le "${installedmodscount}" ]; do ((installedmodsline++)) else fn_print_fail "No mod was selected" - fn_script_log_fatal "No mod was selected" + fn_script_log_fail "No mod was selected" exitcode="1" core_exit.sh fi diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh index 5ce104a955..079ad334d3 100644 --- a/lgsm/modules/command_monitor.sh +++ b/lgsm/modules/command_monitor.sh @@ -206,7 +206,7 @@ fn_monitor_check_session() { else fn_print_error "Checking session: " fn_print_fail_eol_nl - fn_script_log_fatal "Checking session: FAIL" + fn_script_log_fail "Checking session: FAIL" alert="restart" alert.sh fn_script_log_info "Checking session: Monitor is restarting ${selfname}" diff --git a/lgsm/modules/command_skeleton.sh b/lgsm/modules/command_skeleton.sh index 9e7c19a6aa..48a6bd187a 100644 --- a/lgsm/modules/command_skeleton.sh +++ b/lgsm/modules/command_skeleton.sh @@ -18,7 +18,7 @@ find "${rootdir}" -type d -not \( -path ./skel -prune \) | cpio -pdvm skel 2> /d exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_nl "Creating skeleton directory" - fn_script_log_fatal "Creating skeleton directory" + fn_script_log_fail "Creating skeleton directory" else fn_print_ok_nl "Creating skeleton directory: ./skel" fn_script_log_pass "Creating skeleton directory: ./skel" diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index a0a6986028..4b45f0bc36 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -120,10 +120,10 @@ fn_start_tmux() { check_status.sh if [ "${status}" == "0" ]; then fn_print_fail_nl "Unable to start ${servername}" - fn_script_log_fatal "Unable to start ${servername}" + fn_script_log_fail "Unable to start ${servername}" if [ -s "${lgsmlogdir}/.${selfname}-tmux-error.tmp" ]; then fn_print_fail_nl "Unable to start ${servername}: tmux error:" - fn_script_log_fatal "Unable to start ${servername}: tmux error:" + fn_script_log_fail "Unable to start ${servername}: tmux error:" echo -e "" echo -e "Command" fn_messages_separator diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index 409e57b145..ee91528629 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -248,7 +248,7 @@ fn_stop_tmux() { fn_script_log_pass "Stopped ${servername}" else fn_print_fail_nl "Unable to stop ${servername}" - fn_script_log_fatal "Unable to stop ${servername}" + fn_script_log_fail "Unable to stop ${servername}" fi } diff --git a/lgsm/modules/command_update_linuxgsm.sh b/lgsm/modules/command_update_linuxgsm.sh index 3bdffea3f5..61b7e5861c 100644 --- a/lgsm/modules/command_update_linuxgsm.sh +++ b/lgsm/modules/command_update_linuxgsm.sh @@ -24,7 +24,7 @@ if [ $? != "0" ]; then curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null if [ $? != "0" ]; then fn_print_fail_nl "Selecting repo: Unable to to access GitHub or Bitbucket repositories" - fn_script_log_fatal "Selecting repo: Unable to to access GitHub or Bitbucket repositories" + fn_script_log_fail "Selecting repo: Unable to to access GitHub or Bitbucket repositories" core_exit.sh else remotereponame="Bitbucket" @@ -44,8 +44,8 @@ else fi if [ $? != "0" ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Checking ${remotereponame} script linuxgsm.sh" - fn_script_log_fatal "Curl returned error: $?" + fn_script_log_fail "Checking ${remotereponame} script linuxgsm.sh" + fn_script_log_fail "Curl returned error: $?" core_exit.sh fi @@ -82,7 +82,7 @@ if [ "${script_diff}" != "" ]; then cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak" if [ $? != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Backup script ${selfname}" + fn_script_log_fail "Backup script ${selfname}" core_exit.sh else fn_print_ok_eol_nl @@ -103,7 +103,7 @@ if [ "${script_diff}" != "" ]; then if [ $? != "0" ]; then fn_print_fail_eol_nl - fn_script_log_fatal "copying ${selfname}" + fn_script_log_fail "copying ${selfname}" core_exit.sh else fn_print_ok_eol_nl @@ -124,8 +124,8 @@ else fi if [ $? != "0" ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Checking ${remotereponame} config _default.cfg" - fn_script_log_fatal "Curl returned error: $?" + fn_script_log_fail "Checking ${remotereponame} config _default.cfg" + fn_script_log_fail "Curl returned error: $?" core_exit.sh fi @@ -158,8 +158,8 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then fi if [ $? != "0" ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" - fn_script_log_fatal "Curl returned error: $?" + fn_script_log_fail "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" + fn_script_log_fail "Curl returned error: $?" core_exit.sh fi @@ -200,7 +200,7 @@ if [ -n "${modulesdir}" ]; then echo -en "removing module ${modulefile}...\c" if ! rm -f "${modulefile:?}"; then fn_print_fail_eol_nl - fn_script_log_fatal "Removing module ${modulefile}" + fn_script_log_fail "Removing module ${modulefile}" core_exit.sh else fn_print_ok_eol_nl diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index 9d170626c8..8f05be0742 100644 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -93,27 +93,27 @@ fn_dl_steamcmd() { # Not enough space. if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" core_exit.sh # Not enough space. elif [ -n "$(grep "0x212" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" core_exit.sh # Need tp purchase game. elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${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" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" core_exit.sh # Two-factor authentication failure elif [ -n "$(grep "Two-factor code mismatch" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure" core_exit.sh # Incorrect Branch password elif [ -n "$(grep "Password check for AppId" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect" core_exit.sh # Update did not finish. elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ] || [ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then @@ -142,7 +142,7 @@ fn_dl_steamcmd() { if [ "${counter}" -gt "10" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys" - fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys" core_exit.sh fi done @@ -195,7 +195,7 @@ fn_dl_hash() { fn_print_fail_eol_nl echo -e "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" echo -e "expected ${hashtype} checksum: ${hash}" - fn_script_log_fatal "Verifying ${local_filename} with ${hashtype}" + fn_script_log_fail "Verifying ${local_filename} with ${hashtype}" fn_script_log_info "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" fn_script_log_info "Expected ${hashtype} checksum: ${hash}" core_exit.sh @@ -226,8 +226,8 @@ fn_dl_extract() { if [ ! -f "${local_filedir}/${local_filename}" ]; then fn_print_fail_eol_nl echo -en "file ${local_filedir}/${local_filename} not found" - fn_script_log_fatal "Extracting ${local_filename}" - fn_script_log_fatal "File ${local_filedir}/${local_filename} not found" + fn_script_log_fail "Extracting ${local_filename}" + fn_script_log_fail "File ${local_filedir}/${local_filename} not found" core_exit.sh fi mime=$(file -b --mime-type "${local_filedir}/${local_filename}") @@ -259,7 +259,7 @@ fn_dl_extract() { local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Extracting ${local_filename}" + fn_script_log_fail "Extracting ${local_filename}" if [ -f "${lgsmlog}" ]; then echo -e "${extractcmd}" >> "${lgsmlog}" fi @@ -319,8 +319,8 @@ fn_check_file() { if [ ${counter} -ge 2 ]; then fn_print_fail_eol_nl if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Checking ${remote_filename}" - fn_script_log_fatal "${fileurl}" + fn_script_log_fail "Checking ${remote_filename}" + fn_script_log_fail "${fileurl}" checkflag=1 fi else @@ -420,8 +420,8 @@ fn_fetch_file() { if [ ${counter} -ge 2 ]; then fn_print_fail_eol_nl if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Downloading ${local_filename}..." - fn_script_log_fatal "${fileurl}" + fn_script_log_fail "Downloading ${local_filename}..." + fn_script_log_fail "${fileurl}" fi core_exit.sh else @@ -616,7 +616,7 @@ fn_dl_latest_release_github() { # Check how many releases we got from the api and exit if we have more then one. if [ "$(echo -e "${githubreleaseassets}" | jq '. | length')" -gt 1 ]; then fn_print_fatal_nl "Found more than one release to download - Please report this to the LinuxGSM issue tracker" - fn_script_log_fatal "Found more than one release to download - Please report this to the LinuxGSM issue tracker" + fn_script_log_fail "Found more than one release to download - Please report this to the LinuxGSM issue tracker" else # Set variables for download via fn_fetch_file. githubreleasefilename=$(echo -e "${githubreleaseassets}" | jq -r '.[]name') @@ -625,7 +625,7 @@ fn_dl_latest_release_github() { # Error if no version is there. if [ -z "${githubreleasefilename}" ]; then fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" - fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fail "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" else # Fetch file from the remote location from the existing module to the ${tmpdir} for now. fn_fetch_file "${githubreleasedownloadlink}" "" "${githubreleasefilename}" "" "${githubreleasedownloadpath}" "${githubreleasefilename}" diff --git a/lgsm/modules/core_exit.sh b/lgsm/modules/core_exit.sh index 6947a3d4a8..496cde4221 100644 --- a/lgsm/modules/core_exit.sh +++ b/lgsm/modules/core_exit.sh @@ -29,7 +29,7 @@ elif [ "${exitcode}" != "0" ]; then # List LinuxGSM version in logs fn_script_log_info "LinuxGSM version: ${version}" if [ "${exitcode}" == "1" ]; then - fn_script_log_fatal "${moduleselfname} exiting with code: ${exitcode}" + fn_script_log_fail "${moduleselfname} exiting with code: ${exitcode}" elif [ "${exitcode}" == "2" ]; then fn_script_log_error "${moduleselfname} exiting with code: ${exitcode}" elif [ "${exitcode}" == "3" ]; then diff --git a/lgsm/modules/core_github.sh b/lgsm/modules/core_github.sh index 228fe1078d..7290f9bdfc 100644 --- a/lgsm/modules/core_github.sh +++ b/lgsm/modules/core_github.sh @@ -28,7 +28,7 @@ fn_github_get_latest_release_version() { # error if no version is there if [ -z "${githubreleaseversion}" ]; then fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" - fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fail "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" fi } @@ -46,7 +46,7 @@ fn_github_set_latest_release_version() { # error if no version is there if [ -z "${githubreleaseversion}" ]; then fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" - fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fail "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" else echo "${githubreleaseversion}" > "${githublocalversionfile}" fi @@ -81,7 +81,7 @@ fn_github_compare_version() { # error if no version is there if [ -z "${githubreleaseversion}" ]; then fn_print_fail_nl "Can not get version from Github Api for ${githubreleaseuser}/${githubreleaserepo}" - fn_script_log_fatal "Can not get version from Github Api for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fail "Can not get version from Github Api for ${githubreleaseuser}/${githubreleaserepo}" else if [ "${githublocalversion}" == "${githubreleaseversion}" ]; then echo -en "\n" diff --git a/lgsm/modules/core_messages.sh b/lgsm/modules/core_messages.sh index 7bcdb71cb7..e0faae0c2d 100644 --- a/lgsm/modules/core_messages.sh +++ b/lgsm/modules/core_messages.sh @@ -71,7 +71,7 @@ fn_script_log_pass() { } ## Feb 28 14:56:58 ut99-server: Monitor: FAIL: -fn_script_log_fatal() { +fn_script_log_fail() { if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then echo -e "$(date '+%b %d %H:%M:%S.%3N') ${selfname}: ${commandname}: FAIL: ${1}" >> "${lgsmlog}" diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh index ca16607c3f..0a2ca66937 100644 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -25,7 +25,7 @@ fn_check_steamcmd_user() { fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" echo -e " * Change steamuser=\"username\" to a valid steam login." if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}" + fn_script_log_fail "Steam login not set. Update steamuser in ${configdirserver}" fi core_exit.sh fi @@ -130,7 +130,7 @@ fn_check_steamcmd_clear() { rm -rf "${steamcmddir:?}" exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${rootdir}/steamcmd" + fn_script_log_fail "Removing ${rootdir}/steamcmd" else fn_script_log_pass "Removing ${rootdir}/steamcmd" fi @@ -155,7 +155,7 @@ fn_update_steamcmd_localbuild() { # Checks if localbuild variable has been set. if [ -z "${localbuild}" ]; then fn_print_fail "Checking local build: ${remotelocation}: missing local build info" - fn_script_log_fatal "Missing local build info" + fn_script_log_fail "Missing local build info" core_exit.sh else fn_print_ok "Checking local build: ${remotelocation}" @@ -189,7 +189,7 @@ fn_update_steamcmd_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -199,7 +199,7 @@ fn_update_steamcmd_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi @@ -306,7 +306,7 @@ fn_check_steamcmd_appmanifest() { # if error can not be resolved. if [ "${appmanifestfilewc}" -ge "2" ]; then fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" - fn_script_log_fatal "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" + fn_script_log_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" echo -e "* Check user permissions" for appfile in ${appmanifestfile}; do echo -e " ${appfile}" @@ -328,7 +328,7 @@ fn_check_steamcmd_appmanifest() { fn_appmanifest_info if [ "${appmanifestfilewc}" -eq "0" ]; then fn_print_fail_nl "Still no appmanifest_${appid}.acf found" - fn_script_log_fatal "Still no appmanifest_${appid}.acf found" + fn_script_log_fail "Still no appmanifest_${appid}.acf found" core_exit.sh fi fi diff --git a/lgsm/modules/fix_ts3.sh b/lgsm/modules/fix_ts3.sh index c655a43224..5c80aa15e1 100644 --- a/lgsm/modules/fix_ts3.sh +++ b/lgsm/modules/fix_ts3.sh @@ -40,7 +40,7 @@ if [ -f "${accountingfile}" ] && [ "${status}" == "0" ]; then # file is not owned by the current user and needs to be deleted manually. else fn_print_error_nl "File ${accountingfile} is not owned by $(whoami) and needs to be deleted manually" - fn_script_log_fatal "File ${accountingfile} is not owned by $(whoami) and needs to be deleted manually" + fn_script_log_fail "File ${accountingfile} is not owned by $(whoami) and needs to be deleted manually" core_exit.sh fi fi diff --git a/lgsm/modules/install_complete.sh b/lgsm/modules/install_complete.sh index 3415f8a493..4418486d91 100644 --- a/lgsm/modules/install_complete.sh +++ b/lgsm/modules/install_complete.sh @@ -12,7 +12,7 @@ fn_messages_separator if [ "${exitcode}" == "1" ]; then echo -e "${bold}${red}Install Failed!${default}" - fn_script_log_fatal "Install Failed!" + fn_script_log_fail "Install Failed!" elif [ "${exitcode}" == "2" ]; then echo -e "${bold}${red}Install Completed with Errors!${default}}" fn_script_log_error "Install Completed with Errors!" diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index c7a0736b68..699e4480e0 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -15,7 +15,7 @@ fn_check_cfgdir() { changes+=$(mkdir -pv "${servercfgdir}") if [ "$?" -ne 0 ]; then # shellcheck disable=SC2181 fn_print_fail_eol_nl - fn_script_log_fatal "creating ${servercfgdir} config directory" + fn_script_log_fail "creating ${servercfgdir} config directory" core_exit.sh elif [ "${changes}" != "" ]; then fn_print_ok_eol_nl @@ -57,7 +57,7 @@ fn_default_config_remote() { fi if [ "$?" -ne 0 ]; then # shellcheck disable=SC2181 fn_print_fail_eol_nl - fn_script_log_fatal "copying config file ${servercfgfullpath}" + fn_script_log_fail "copying config file ${servercfgfullpath}" elif [ "${changes}" != "" ]; then fn_print_ok_eol_nl fn_script_log_pass "copying config file ${servercfgfullpath}" @@ -79,7 +79,7 @@ fn_default_config_local() { cp -n "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}" if [ "${exitcode}" != 0 ]; then fn_print_fail_eol - fn_script_log_fatal "copying config file [ ${servercfgdefault} ]" + fn_script_log_fail "copying config file [ ${servercfgdefault} ]" else fn_print_ok_eol fn_script_log_pass "copying config file [ ${servercfgdefault} ]" @@ -104,7 +104,7 @@ fn_set_config_vars() { fi if [ "$?" -ne 0 ]; then # shellcheck disable=SC2181 fn_print_fail_eol - fn_script_log_fatal "changing server name" + fn_script_log_fail "changing server name" elif [ "${changes}" != "" ]; then fn_print_ok_eol_nl fn_script_log_pass "changing server name" @@ -124,7 +124,7 @@ fn_set_config_vars() { fi if [ "$?" -ne 0 ]; then # shellcheck disable=SC2181 fn_print_fail_eol - fn_script_log_fatal "generating rcon/admin password" + fn_script_log_fail "generating rcon/admin password" elif [ "${changes}" != "" ]; then fn_print_ok_eol_nl fn_script_log_pass "generating rcon/admin password" @@ -143,7 +143,7 @@ fn_set_dst_config_vars() { changes+=$(sed -i "s/SERVERNAME/${servername}/g w /dev/stdout" "${clustercfgfullpath}") if [ "$?" -ne 0 ]; then # shellcheck disable=SC2181 fn_print_fail_eol - fn_script_log_fatal "changing cluster name" + fn_script_log_fail "changing cluster name" elif [ "${changes}" != "" ]; then fn_print_ok_eol_nl fn_script_log_pass "changing cluster name" @@ -158,7 +158,7 @@ fn_set_dst_config_vars() { changes+=$(sed -i "s/CLUSTERKEY/${randomstring}/g w /dev/stdout" "${clustercfgfullpath}") if [ "$?" -ne 0 ]; then # shellcheck disable=SC2181 fn_print_fail_eol - fn_script_log_fatal "generating cluster key" + fn_script_log_fail "generating cluster key" elif [ "${changes}" != "" ]; then fn_print_ok_eol_nl fn_script_log_pass "generating cluster key" diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 6dbf0eb23d..65bcff5a82 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -199,7 +199,7 @@ fn_install_server_files() { md5="0188ae86dbc9376f11ae3032dba2d665" else fn_print_fail_nl "Installing ${gamename} Server failed, missing default configuration" - fn_script_log_fatal "Installing ${gamename} Server failed, missing default configuration" + fn_script_log_fail "Installing ${gamename} Server failed, missing default configuration" fi fn_fetch_file "${remote_fileurl}" "" "" "" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}" diff --git a/lgsm/modules/install_ts3db.sh b/lgsm/modules/install_ts3db.sh index 56bc52aa11..e5776c30f8 100644 --- a/lgsm/modules/install_ts3db.sh +++ b/lgsm/modules/install_ts3db.sh @@ -14,7 +14,7 @@ fn_install_ts3db_mariadb() { local exitcode=$? if [ "${exitcode}" != "0" ]; then fn_print_fail_eol_nl - fn_script_log_fatal "copying libmariadb.so.2" + fn_script_log_fail "copying libmariadb.so.2" core_exit.sh else fn_print_ok_eol_nl diff --git a/lgsm/modules/mods_core.sh b/lgsm/modules/mods_core.sh index 2078ae1673..1b85a95b35 100644 --- a/lgsm/modules/mods_core.sh +++ b/lgsm/modules/mods_core.sh @@ -22,7 +22,7 @@ fn_mod_install_files() { # Check if variable is valid checking if file has been downloaded and exists. if [ ! -f "${modstmpdir}/${modfilename}" ]; then fn_print_failure "An issue occurred downloading ${modprettyname}" - fn_script_log_fatal "An issue occurred downloading ${modprettyname}" + fn_script_log_fail "An issue occurred downloading ${modprettyname}" core_exit.sh fi if [ ! -d "${extractdest}" ]; then @@ -77,7 +77,7 @@ fn_mod_create_filelist() { local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Building ${modsdir}/${modcommand}-files.txt" + fn_script_log_fail "Building ${modsdir}/${modcommand}-files.txt" core_exit.sh else fn_print_ok_eol_nl @@ -97,7 +97,7 @@ fn_mod_copy_destination() { local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Copying ${modprettyname} to ${modinstalldir}" + fn_script_log_fail "Copying ${modprettyname} to ${modinstalldir}" else fn_print_ok_eol_nl fn_script_log_pass "Copying ${modprettyname} to ${modinstalldir}" @@ -135,7 +135,7 @@ fn_mod_tidy_files_list() { local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Error while tidying line: ${removefilevar} from: ${modsdir}/${modcommand}-files.txt" + fn_script_log_fail "Error while tidying line: ${removefilevar} from: ${modsdir}/${modcommand}-files.txt" core_exit.sh break fi @@ -228,7 +228,7 @@ fn_mod_get_info() { # Define all variables for a mod at once when index is set to a separator. fn_mods_define() { if [ -z "$index" ]; then - fn_script_log_fatal "index variable not set. Please report an issue." + fn_script_log_fail "index variable not set. Please report an issue." fn_print_error "index variable not set. Please report an issue." echo -e "* https://github.com/GameServerManagers/LinuxGSM/issues" core_exit.sh @@ -390,7 +390,7 @@ fn_create_mods_dir() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Creating mod download dir ${modsdir}" + fn_script_log_fail "Creating mod download dir ${modsdir}" core_exit.sh else fn_print_ok_eol_nl @@ -404,7 +404,7 @@ fn_create_mods_dir() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Creating mod install directory ${modinstalldir}" + fn_script_log_fail "Creating mod install directory ${modinstalldir}" core_exit.sh else fn_print_ok_eol_nl @@ -427,7 +427,7 @@ fn_mods_create_tmp_dir() { echo -en "creating mod download directory ${modstmpdir}..." if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Creating mod download directory ${modstmpdir}" + fn_script_log_fail "Creating mod download directory ${modstmpdir}" core_exit.sh else fn_print_ok_eol_nl @@ -444,7 +444,7 @@ fn_mods_clear_tmp_dir() { exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Clearing mod download directory ${modstmpdir}" + fn_script_log_fail "Clearing mod download directory ${modstmpdir}" core_exit.sh else fn_print_ok_eol_nl @@ -491,12 +491,12 @@ fn_check_mod_files_list() { if [ "${modsfilelistsize}" -eq 0 ]; then fn_print_failure "${modcommand}-files.txt is empty" echo -e "* Unable to remove ${modprettyname}" - fn_script_log_fatal "${modcommand}-files.txt is empty: Unable to remove ${modprettyname}." + fn_script_log_fail "${modcommand}-files.txt is empty: Unable to remove ${modprettyname}." core_exit.sh fi else fn_print_failure "${modsdir}/${modcommand}-files.txt does not exist" - fn_script_log_fatal "${modsdir}/${modcommand}-files.txt does not exist: Unable to remove ${modprettyname}." + fn_script_log_fail "${modsdir}/${modcommand}-files.txt does not exist: Unable to remove ${modprettyname}." core_exit.sh fi } @@ -519,7 +519,7 @@ fn_mod_exist() { fn_mod_required_fail_exist() { modreq=$1 # requires one parameter, the mod - fn_script_log_fatal "${modreq}-files.txt is empty: unable to find ${modreq} installed" + fn_script_log_fail "${modreq}-files.txt is empty: unable to find ${modreq} installed" echo -en "* Unable to find '${modreq}' which is required prior to installing this mod..." fn_print_fail_eol_nl core_exit.sh @@ -581,7 +581,7 @@ fn_mod_install_liblist_gam_file() { exitcode=$? # if replacement back didn't happen, error out. if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass "${logentry}" @@ -597,7 +597,7 @@ fn_mod_install_liblist_gam_file() { exitcode=$? # if replacement back didn't happen, error out if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass "${logentry}" @@ -615,7 +615,7 @@ fn_mod_install_liblist_gam_file() { exitcode=$? # if replacement back didn't happen, error out. if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass ${logentry} @@ -639,7 +639,7 @@ fn_mod_remove_liblist_gam_file() { exitcode=$? # if replacement back didn't happen, error out. if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass ${logentry} @@ -655,7 +655,7 @@ fn_mod_remove_liblist_gam_file() { exitcode=$? # if replacement back didn't happen, error out if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass ${logentry} @@ -673,7 +673,7 @@ fn_mod_remove_liblist_gam_file() { # if replacement back didn't happen, error out. exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass ${logentry} @@ -696,7 +696,7 @@ fn_mod_install_amxmodx_file() { echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" >> "${modinstalldir}/addons/metamod/plugins.ini" exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass ${logentry} @@ -708,7 +708,7 @@ fn_mod_install_amxmodx_file() { echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" > "${modinstalldir}/addons/metamod/plugins.ini" exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl core_exit.sh else @@ -733,7 +733,7 @@ fn_mod_remove_amxmodx_file() { sed -i '/^$/d' "${modinstalldir}/addons/metamod/plugins.ini" exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${logentry}" + fn_script_log_fail "${logentry}" fn_print_fail_eol_nl else fn_script_log_pass ${logentry} diff --git a/lgsm/modules/update_fctr.sh b/lgsm/modules/update_fctr.sh index 9b88fcd170..2eef0d4cd1 100644 --- a/lgsm/modules/update_fctr.sh +++ b/lgsm/modules/update_fctr.sh @@ -46,7 +46,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -56,7 +56,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_jk2.sh b/lgsm/modules/update_jk2.sh index e67b0c02b8..f685fd4cb9 100644 --- a/lgsm/modules/update_jk2.sh +++ b/lgsm/modules/update_jk2.sh @@ -43,7 +43,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -53,7 +53,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_mc.sh b/lgsm/modules/update_mc.sh index 2f7381da78..c4aa1b425c 100644 --- a/lgsm/modules/update_mc.sh +++ b/lgsm/modules/update_mc.sh @@ -58,7 +58,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -68,7 +68,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_mcb.sh b/lgsm/modules/update_mcb.sh index b95d6d9e42..eb8adfd12c 100644 --- a/lgsm/modules/update_mcb.sh +++ b/lgsm/modules/update_mcb.sh @@ -18,7 +18,7 @@ fn_update_dl() { local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol_nl - fn_script_log_fatal "Extracting ${local_filename}" + fn_script_log_fail "Extracting ${local_filename}" if [ -f "${lgsmlog}" ]; then echo -e "${extractcmd}" >> "${lgsmlog}" fi @@ -64,7 +64,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -74,7 +74,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_mta.sh b/lgsm/modules/update_mta.sh index fd728b22df..cd11955639 100644 --- a/lgsm/modules/update_mta.sh +++ b/lgsm/modules/update_mta.sh @@ -45,7 +45,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -55,7 +55,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_pmc.sh b/lgsm/modules/update_pmc.sh index 2ad6b91abc..9bfa82101e 100644 --- a/lgsm/modules/update_pmc.sh +++ b/lgsm/modules/update_pmc.sh @@ -68,7 +68,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -78,7 +78,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_ts3.sh b/lgsm/modules/update_ts3.sh index bb137a0b30..c00ae75cba 100644 --- a/lgsm/modules/update_ts3.sh +++ b/lgsm/modules/update_ts3.sh @@ -50,7 +50,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -60,7 +60,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi @@ -164,7 +164,7 @@ elif [ "${arch}" == "i386" ] || [ "${arch}" == "i686" ]; then ts3arch="x86" else fn_print_failure "Unknown or unsupported architecture: ${arch}" - fn_script_log_fatal "Unknown or unsupported architecture: ${arch}" + fn_script_log_fail "Unknown or unsupported architecture: ${arch}" core_exit.sh fi diff --git a/lgsm/modules/update_ut99.sh b/lgsm/modules/update_ut99.sh index c1dc1dade5..bdd3631f39 100644 --- a/lgsm/modules/update_ut99.sh +++ b/lgsm/modules/update_ut99.sh @@ -44,7 +44,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -54,7 +54,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/lgsm/modules/update_vints.sh b/lgsm/modules/update_vints.sh index 47195b9b20..b383720588 100644 --- a/lgsm/modules/update_vints.sh +++ b/lgsm/modules/update_vints.sh @@ -51,7 +51,7 @@ fn_update_remotebuild() { # Checks if remotebuildversion variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" + fn_script_log_fail "Checking remote build" core_exit.sh else fn_print_ok "Checking remote build: ${remotelocation}" @@ -61,7 +61,7 @@ fn_update_remotebuild() { # Checks if remotebuild variable has been set. if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" core_exit.sh fi fi diff --git a/linuxgsm.sh b/linuxgsm.sh index 458cc0bd1c..5440548cc9 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -124,8 +124,8 @@ fn_bootstrap_fetch_file() { if [ ${counter} -ge 2 ]; then echo -e "FAIL" if [ -f "${lgsmlog}" ]; then - fn_script_log_fatal "Downloading ${local_filename}" - fn_script_log_fatal "${fileurl}" + fn_script_log_fail "Downloading ${local_filename}" + fn_script_log_fail "${fileurl}" fi core_exit.sh else