diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index 84f5998cd..037ec500f 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -20,7 +20,7 @@ fn_stop_graceful_ctrlc() { for seconds in {1..30}; do check_status.sh if [ "${status}" == "0" ]; then - fn_print_ok "Graceful: CTRL+c: ${seconds}: " + fn_print_ok "Graceful: CTRL+c: ${seconds}" fn_print_ok_eol_nl fn_script_log_pass "Graceful: CTRL+c: OK: ${seconds} seconds" if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then @@ -52,7 +52,7 @@ fn_stop_graceful_cmd() { for ((seconds = 1; seconds <= ${2}; seconds++)); do check_status.sh if [ "${status}" == "0" ]; then - fn_print_ok "Graceful: sending \"${1}\": ${seconds}: " + fn_print_ok "Graceful: sending \"${1}\": ${seconds}" fn_print_ok_eol_nl fn_script_log_pass "Graceful: sending \"${1}\": OK: ${seconds} seconds" if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then @@ -85,7 +85,7 @@ fn_stop_graceful_goldsrc() { fn_sleep_time_1 fn_print_dots "Graceful: sending \"quit\": ${seconds}" done - fn_print_ok "Graceful: sending \"quit\": ${seconds}: " + fn_print_ok "Graceful: sending \"quit\": ${seconds}" fn_print_ok_eol_nl fn_script_log_pass "Graceful: sending \"quit\": OK: ${seconds} seconds" if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then @@ -297,7 +297,7 @@ fn_stop_graceful_avorion() { for seconds in {1..30}; do check_status.sh if [ "${status}" == "0" ]; then - fn_print_ok "Graceful: /save /stop: ${seconds}: " + fn_print_ok "Graceful: /save /stop: ${seconds}" fn_print_ok_eol_nl fn_script_log_pass "Graceful: /save /stop: OK: ${seconds} seconds" if [ "${statusalert}" == "on" ] && [ "${firstcommandname}" == "STOP" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 8f22fd0ce..9e3649bdd 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -109,14 +109,15 @@ fn_set_config_vars() { else changes+=$(sed -i "s/SERVERNAME/${servername}/g w /dev/stdout" "${servercfgfullpath}") fi - echo -e "changing rcon/admin password." + echo -en "changing rcon/admin password." fn_script_log_info "Changing rcon/admin password." if [ "${shortname}" == "squad" ]; then changes+=$(sed -i "s/ADMINPASSWORD/${adminpass}/g w /dev/stdout" "${servercfgdir}/Rcon.cfg") else changes+=$(sed -i "s/ADMINPASSWORD/${adminpass}/g w /dev/stdout" "${servercfgfullpath}") fi - if [ "$?" -ne 0 ]; then # shellcheck disable=SC2181 + exitcode=$? + if [ "${exitcode}" -ne 0 ]; then # shellcheck disable=SC2181 fn_print_fail_eol fn_script_log_fail "generating rcon/admin password" elif [ "${changes}" != "" ]; then