diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index cfdac39f5..3c5849d45 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -72,7 +72,8 @@ fn_found_missing_deps(){ echo -e "" sudo -n true > /dev/null 2>&1 if [ $? -eq 0 ]; then - fn_print_info_nl "Attempting to install missing dependencies automatically" + fn_print_infomation_nl "Attempting to install missing dependencies automatically" + fn_script_log_info "Attempting to install missing dependencies automatically" echo -en ".\r" sleep 1 echo -en "..\r" @@ -82,15 +83,22 @@ fn_found_missing_deps(){ echo -en " \r" if [ -n "$(command -v dpkg-query)" ]; then cmd="sudo dpkg --add-architecture i386; sudo apt-get -y install ${array_deps_missing[@]}" - eval $cmd + eval ${cmd} elif [ -n "$(command -v yum)" ]; then cmd="sudo yum -y install ${array_deps_missing[@]}" - eval $cmd + eval ${cmd} + fi + if [ $? != 0 ]; then + fn_print_failure_nl "Unable to install dependencies" + fn_script_log_fail "Unable to install dependencies" + else + fn_print_success_nl "install dependencies completed" + fn_script_log_pass "install dependencies completed" fi else echo "" - fn_print_infomation_nl "$(whoami) does not have sudo access. Please manually install dependencies" - fn_script_log_info "$(whoami) does not have sudo access. Please manually install dependencies" + fn_print_warning_nl "$(whoami) does not have sudo access. Please manually install dependencies" + fn_script_log_warn "$(whoami) does not have sudo access. Please manually install dependencies" echo "" if [ -n "$(command -v dpkg-query)" ]; then echo "sudo dpkg --add-architecture i386; sudo apt-get install ${array_deps_missing[@]}" diff --git a/lgsm/functions/check_glibc.sh b/lgsm/functions/check_glibc.sh index 41d4d6ebf..5918bac44 100644 --- a/lgsm/functions/check_glibc.sh +++ b/lgsm/functions/check_glibc.sh @@ -15,7 +15,7 @@ info_distro.sh if [ "${glibcrequired}" == "NOT REQUIRED" ]; then : elif [ "${glibcrequired}" == "UNKNOWN" ]; then - fn_print_info_nl "Glibc fix: ${red}${glibcrequired}${default}" + fn_print_error_nl "Glibc fix: ${red}${glibcrequired}${default}" echo -e " * glibc required: ${red}${glibcrequired}${default}" echo -e " * glibc installed: ${glibcversion}" elif [ "$(printf '%s\n'${glibcrequired}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibcrequired}" ]; then @@ -27,7 +27,7 @@ elif [ "$(printf '%s\n'${glibcrequired}'\n' ${glibcversion} | sort -V | head -n fix_glibc.sh fi else - fn_print_warn_nl "Glibc fix: ${red}No Glibc fix available!${default}" + fn_print_error_nl "Glibc fix: ${red}No Glibc fix available!${default}" echo -en "\n" echo -e " * glibc required: ${glibcrequired}" echo -e " * glibc installed: ${red}${glibcversion}${default}" diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 991aa435c..4a4757590 100644 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -23,8 +23,6 @@ fn_start_teamspeak3(){ sleep 5 touch "${servercfgfullpath}" fi - - fn_print_dots "${servername}" sleep 1 check_status.sh if [ "${status}" != "0" ]; then @@ -57,8 +55,6 @@ fn_start_teamspeak3(){ fn_start_tmux(){ fn_parms - fn_print_dots "${servername}" - sleep 1 # Log rotation check_status.sh @@ -166,6 +162,8 @@ fn_start_tmux(){ echo -en "\n" } +fn_print_dots "${servername}" +sleep 1 check.sh fix.sh info_config.sh diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 5cb3cb5f1..b1a39129a 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -256,9 +256,9 @@ fn_stop_pre_check(){ fi } -check.sh -info_config.sh fn_print_dots "${servername}" sleep 1 +check.sh +info_config.sh fn_stop_pre_check core_exit.sh \ No newline at end of file diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh index 98e4d1cf6..ee8f8ddf3 100644 --- a/lgsm/functions/command_test_alert.sh +++ b/lgsm/functions/command_test_alert.sh @@ -8,6 +8,7 @@ local commandnane="ALERT" local commandaction="Alert" local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +fn_print_dots "${servername}" check.sh info_config.sh alert="test" diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index b9ecb82dc..a72f84e65 100644 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -8,9 +8,11 @@ local commandnane="UPDATE" local commandaction="Update" local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +fn_print_dots "Checking for update" +sleep 1 check.sh -fn_print_dots "Checking for update" + if [ "${gamename}" == "Teamspeak 3" ]; then update_ts3.sh elif [ "${engine}" == "goldsource" ]||[ "${forceupdate}" == "1" ]; then diff --git a/lgsm/functions/command_update_functions.sh b/lgsm/functions/command_update_functions.sh index 329bab64d..756185aba 100644 --- a/lgsm/functions/command_update_functions.sh +++ b/lgsm/functions/command_update_functions.sh @@ -6,10 +6,11 @@ local commandaction="Update LGSM" local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -check.sh + fn_print_dots "Updating functions" -fn_script_log_info "Updating functions" sleep 1 +check.sh +fn_script_log_info "Updating functions" echo -ne "\n" # Removed legecy functions dir diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 09bfb6e8a..2f99f9b27 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -13,8 +13,6 @@ fn_validation(){ echo -en "https://developer.valvesoftware.com/wiki/SteamCMD#Validate" sleep 5 echo -en "\n" - fn_print_dots "Checking server files" - sleep 1 fn_print_ok "Checking server files" fn_script_log_info "Checking server files" sleep 1 @@ -35,6 +33,9 @@ fn_validation(){ fn_script_log_info "Checking complete" } +fn_print_dots "Checking server files" +sleep 1 +check.sh check_status.sh if [ "${status}" != "0" ]; then exitbypass=1 diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index 57c3f6ebc..99e3c0e75 100644 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -218,11 +218,11 @@ fn_print_failure_nl(){ } # Error! -fn_print_error(){ +fn_print_error2(){ echo -en "${red}Error!${default} $@" } -fn_print_error_nl(){ +fn_print_error2_nl(){ echo -e "${red}Error!${default} $@" }