Răsfoiți Sursa

Fixing issues with ut2k4server restart not working

Daniel Gibbs 9 ani în urmă
părinte
comite
b8bfebbd49
2 a modificat fișierele cu 9 adăugiri și 1 ștergeri
  1. 5 1
      lgsm/functions/command_start.sh
  2. 4 0
      lgsm/functions/fix_ut2k4.sh

+ 5 - 1
lgsm/functions/command_start.sh

@@ -29,7 +29,11 @@ fn_start_teamspeak3(){
 	if [ "${status}" != "0" ]; then
 		fn_print_info_nl "${servername} is already running"
 		fn_script_log_error "${servername} is already running"
-		core_exit.sh
+		if [ "${exitbypass}" ]; then
+			exit
+		else
+			core_exit.sh
+		fi
 	fi
 	if [ -f "${lgsmlog}" ]; then
 		mv "${lgsmlog}" "${lgsmlogdate}"

+ 4 - 0
lgsm/functions/fix_ut2k4.sh

@@ -21,9 +21,13 @@ echo "applying server name fix."
 sleep 1
 echo "forcing server restart..."
 sleep 1
+exitbypass=1
 command_start.sh
 sleep 5
+exitbypass=1
 command_stop.sh
+exitbypass=1
 command_start.sh
 sleep 5
+exitbypass=1
 command_stop.sh