Daniel Gibbs 10 лет назад
Родитель
Сommit
3f22dc1ef5

+ 1 - 0
lgsm/functions/command_test_alert.sh

@@ -13,3 +13,4 @@ check.sh
 info_config.sh
 alert="test"
 alert.sh
+core_exit.sh

+ 2 - 1
lgsm/functions/command_ts3_server_pass.sh

@@ -60,4 +60,5 @@ if [ "${status}" != "0" ]; then
 	command_start.sh
 else
 	fn_serveradmin_password_set
-fi
+fi
+core_exit.sh

+ 7 - 5
lgsm/functions/command_update_functions.sh

@@ -9,7 +9,7 @@ lgsm_version="210516"
 function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 check.sh
 fn_print_dots "Updating functions"
-fn_script_log "Updating functions"
+fn_script_log_info "Updating functions"
 sleep 1
 echo -ne "\n"
 
@@ -30,10 +30,12 @@ fi
 
 if [ "${exitcode}" == "0" ]; then
 	fn_print_ok "Updating functions"
-	fn_script_log "Success! Updating functions"
+	fn_script_log_pass "Success! Updating functions"
+	exitcode=0
 else
 	fn_print_fail "Updating functions"
-
-	fn_script_log "Failure! Updating functions"
+	fn_script_log_fatal "Failure! Updating functions"
+	exitcode=1
 fi
-echo -ne "\n"
+echo -ne "\n"
+core_exit.sh

+ 2 - 2
lgsm/functions/command_validate.sh

@@ -17,7 +17,7 @@ fn_validation(){
 	fn_print_dots "Checking server files"
 	sleep 1
 	fn_print_ok "Checking server files"
-	fn_script_log "Checking server files"
+	fn_script_log_info "Checking server files"
 	sleep 1
 
 	cd "${rootdir}/steamcmd"
@@ -35,7 +35,7 @@ fn_validation(){
 	fi
 
 	fix.sh
-	fn_script_log "Checking complete"
+	fn_script_log_info "Checking complete"
 }
 
 check_status.sh

+ 1 - 0
lgsm/functions/compress_ut99_maps.sh

@@ -33,3 +33,4 @@ for map in "${filesdir}/Maps/"*; do
 	./ucc-bin compress "${map}" --nohomedir
 done
 mv -fv "${filesdir}/Maps/"*.unr.uz "${compressedmapsdir}"
+core_exit.sh

+ 1 - 2
lgsm/functions/core_exit.sh

@@ -23,5 +23,4 @@ fi
 
 if [ -f ".dev-debug" ]; then
 	echo "Exiting with code: ${exitcode}"
-fi
-
+fi

+ 0 - 3
lgsm/functions/core_functions.sh

@@ -159,9 +159,6 @@ fn_fetch_function
 fn_restart(){
 local modulename="Restarting"
 info_config.sh
-if [ -d "${scriptlogdir}" ]; then
-	fn_script_log "${servername}"
-fi
 command_stop.sh
 command_start.sh
 }

+ 1 - 0
lgsm/functions/core_getopt.sh

@@ -439,3 +439,4 @@ elif [ "${engine}" == "unreal" ]; then
 else
 	fn_getopt_generic
 fi
+core_exit.sh

+ 4 - 3
lgsm/functions/fix.sh

@@ -12,17 +12,18 @@ fn_fix_msg_start(){
 	fn_print_dots "Applying ${fixname} fix: ${gamename}"
 	sleep 1
 	fn_print_info "Applying ${fixname} fix: ${gamename}"
-	fn_script_log "Applying ${fixname} fix: ${gamename}"
+	fn_script_log_info "Applying ${fixname} fix: ${gamename}"
 	sleep 1
 }
 
 fn_fix_msg_end(){
 	if [ $? -ne 0 ]; then
 		fn_print_fail_nl "Applying ${fixname} fix: ${gamename}"
-		fn_script_log "Failure! Applying ${fixname} fix: ${gamename}"
+		fn_script_log_error "Failure! Applying ${fixname} fix: ${gamename}"
+		exitcode=2
 	else
 		fn_print_ok_nl "Applying ${fixname} fix: ${gamename}"
-		fn_script_log "Complete! Applying ${fixname} fix: ${gamename}"
+		fn_script_log_pass "Complete! Applying ${fixname} fix: ${gamename}"
 	fi
 }
 

+ 2 - 2
lgsm/functions/fix_ins.sh

@@ -13,7 +13,7 @@ export LD_LIBRARY_PATH=${filesdir}:${filesdir}/bin:${LD_LIBRARY_PATH}
 # fix for issue #529 - gamemode not passed to debug or start
 
 if [ "${function_selfname}" == "command_debug.sh" ]; then
-        defaultmap="\"${defaultmap}\""
+	defaultmap="\"${defaultmap}\""
 else
-        defaultmap="\\\"${defaultmap}\\\""
+	defaultmap="\\\"${defaultmap}\\\""
 fi

+ 2 - 1
lgsm/functions/install_complete.sh

@@ -14,8 +14,9 @@ if [ "${gamename}" == "Don't Starve Together" ]; then
 fi
 echo "================================="
 echo "Install Complete!"
-fn_script_log "Install Complete!"
+fn_script_log_info "Install Complete!"
 echo ""
 echo "To start server type:"
 echo "./${selfname} start"
 echo ""
+core_exit.sh