Quellcode durchsuchen

Merge pull request #4319 from GameServerManagers/feature/update-restart-bug

Release v23.5.3
Daniel Gibbs vor 2 Jahren
Ursprung
Commit
a77cbf7ad7

+ 0 - 1
lgsm/config-default/config-lgsm/pvrserver/_default.cfg

@@ -11,7 +11,6 @@
 ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
 ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
 ip="0.0.0.0"
 ip="0.0.0.0"
 port="7777"
 port="7777"
-
 # Maps: bridge, datacenter, sand
 # Maps: bridge, datacenter, sand
 defaultmap="datacenter"
 defaultmap="datacenter"
 # Get an API key from https://pavlov-ms.vankrupt.com/servers/v1/key
 # Get an API key from https://pavlov-ms.vankrupt.com/servers/v1/key

+ 1 - 1
lgsm/modules/core_functions.sh

@@ -8,7 +8,7 @@
 
 
 module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 
-modulesversion="v23.5.2"
+modulesversion="v23.5.3"
 
 
 # Core
 # Core
 
 

+ 6 - 1
lgsm/modules/core_modules.sh

@@ -8,7 +8,7 @@
 
 
 moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 
-modulesversion="v23.5.2"
+modulesversion="v23.5.3"
 
 
 # Core
 # Core
 
 
@@ -816,6 +816,11 @@ if [ ! -d "${lockdir}" ]; then
 	mkdir -p "${lockdir}"
 	mkdir -p "${lockdir}"
 fi
 fi
 
 
+# if $USER id missing set to whoami
+if [ -z "${USER}" ]; then
+	USER="$(whoami)"
+fi
+
 # Calls on-screen messages (bootstrap)
 # Calls on-screen messages (bootstrap)
 core_messages.sh
 core_messages.sh
 
 

+ 1 - 1
lgsm/modules/info_messages.sh

@@ -762,7 +762,7 @@ fn_info_logs() {
 		else
 		else
 			echo -e "${gamelogdir}"
 			echo -e "${gamelogdir}"
 			# dos2unix sed 's/\r//'
 			# dos2unix sed 's/\r//'
-			tail "${gamelogdir}"/* 2> /dev/null | grep -v "==>" | sed '/^$/d' | sed 's/\r//' | tail -25
+			tail "${gamelogdir}"/* 2> /dev/null | grep -av "==>" | sed '/^$/d' | sed 's/\r//' | tail -25
 		fi
 		fi
 		echo -e ""
 		echo -e ""
 	fi
 	fi

+ 1 - 1
lgsm/modules/update_fctr.sh

@@ -93,6 +93,7 @@ fn_update_compare() {
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 
 
 		if [ "${commandname}" == "UPDATE" ]; then
 		if [ "${commandname}" == "UPDATE" ]; then
+			date +%s > "${lockdir}/last-updated.lock"
 			unset updateonstart
 			unset updateonstart
 			check_status.sh
 			check_status.sh
 			# If server stopped.
 			# If server stopped.
@@ -120,7 +121,6 @@ fn_update_compare() {
 				fn_firstcommand_reset
 				fn_firstcommand_reset
 			fi
 			fi
 			unset exitbypass
 			unset exitbypass
-			date +%s > "${lockdir}/last-updated.lock"
 			alert="update"
 			alert="update"
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 			alert="check-update"
 			alert="check-update"

+ 1 - 1
lgsm/modules/update_mc.sh

@@ -105,6 +105,7 @@ fn_update_compare() {
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 
 
 		if [ "${commandname}" == "UPDATE" ]; then
 		if [ "${commandname}" == "UPDATE" ]; then
+			date +%s > "${lockdir}/last-updated.lock"
 			unset updateonstart
 			unset updateonstart
 			check_status.sh
 			check_status.sh
 			# If server stopped.
 			# If server stopped.
@@ -132,7 +133,6 @@ fn_update_compare() {
 				fn_firstcommand_reset
 				fn_firstcommand_reset
 			fi
 			fi
 			unset exitbypass
 			unset exitbypass
-			date +%s > "${lockdir}/last-updated.lock"
 			alert="update"
 			alert="update"
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 			alert="check-update"
 			alert="check-update"

+ 1 - 1
lgsm/modules/update_mcb.sh

@@ -111,6 +111,7 @@ fn_update_compare() {
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 
 
 		if [ "${commandname}" == "UPDATE" ]; then
 		if [ "${commandname}" == "UPDATE" ]; then
+			date +%s > "${lockdir}/last-updated.lock"
 			unset updateonstart
 			unset updateonstart
 			check_status.sh
 			check_status.sh
 			# If server stopped.
 			# If server stopped.
@@ -138,7 +139,6 @@ fn_update_compare() {
 				fn_firstcommand_reset
 				fn_firstcommand_reset
 			fi
 			fi
 			unset exitbypass
 			unset exitbypass
-			date +%s > "${lockdir}/last-updated.lock"
 			alert="update"
 			alert="update"
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 			alert="check-update"
 			alert="check-update"

+ 1 - 1
lgsm/modules/update_pmc.sh

@@ -115,6 +115,7 @@ fn_update_compare() {
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 
 
 		if [ "${commandname}" == "UPDATE" ]; then
 		if [ "${commandname}" == "UPDATE" ]; then
+			date +%s > "${lockdir}/last-updated.lock"
 			unset updateonstart
 			unset updateonstart
 			check_status.sh
 			check_status.sh
 			# If server stopped.
 			# If server stopped.
@@ -142,7 +143,6 @@ fn_update_compare() {
 				fn_firstcommand_reset
 				fn_firstcommand_reset
 			fi
 			fi
 			unset exitbypass
 			unset exitbypass
-			date +%s > "${lockdir}/last-updated.lock"
 			alert="update"
 			alert="update"
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 			alert="check-update"
 			alert="check-update"

+ 1 - 1
lgsm/modules/update_ts3.sh

@@ -97,6 +97,7 @@ fn_update_compare() {
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 
 
 		if [ "${commandname}" == "UPDATE" ]; then
 		if [ "${commandname}" == "UPDATE" ]; then
+			date +%s > "${lockdir}/last-updated.lock"
 			unset updateonstart
 			unset updateonstart
 			check_status.sh
 			check_status.sh
 			# If server stopped.
 			# If server stopped.
@@ -124,7 +125,6 @@ fn_update_compare() {
 				fn_firstcommand_reset
 				fn_firstcommand_reset
 			fi
 			fi
 			unset exitbypass
 			unset exitbypass
-			date +%s > "${lockdir}/last-updated.lock"
 			alert="update"
 			alert="update"
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 			alert="check-update"
 			alert="check-update"

+ 1 - 1
lgsm/modules/update_ut99.sh

@@ -91,6 +91,7 @@ fn_update_compare() {
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 
 
 		if [ "${commandname}" == "UPDATE" ]; then
 		if [ "${commandname}" == "UPDATE" ]; then
+			date +%s > "${lockdir}/last-updated.lock"
 			unset updateonstart
 			unset updateonstart
 			check_status.sh
 			check_status.sh
 			# If server stopped.
 			# If server stopped.
@@ -118,7 +119,6 @@ fn_update_compare() {
 				fn_firstcommand_reset
 				fn_firstcommand_reset
 			fi
 			fi
 			unset exitbypass
 			unset exitbypass
-			date +%s > "${lockdir}/last-updated.lock"
 			alert="update"
 			alert="update"
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 			alert="check-update"
 			alert="check-update"

+ 1 - 1
lgsm/modules/update_vints.sh

@@ -98,6 +98,7 @@ fn_update_compare() {
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 		fn_script_log_info "${localbuild} > ${remotebuildversion}"
 
 
 		if [ "${commandname}" == "UPDATE" ]; then
 		if [ "${commandname}" == "UPDATE" ]; then
+			date +%s > "${lockdir}/last-updated.lock"
 			unset updateonstart
 			unset updateonstart
 			check_status.sh
 			check_status.sh
 			# If server stopped.
 			# If server stopped.
@@ -125,7 +126,6 @@ fn_update_compare() {
 				fn_firstcommand_reset
 				fn_firstcommand_reset
 			fi
 			fi
 			unset exitbypass
 			unset exitbypass
-			date +%s > "${lockdir}/last-updated.lock"
 			alert="update"
 			alert="update"
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 		elif [ "${commandname}" == "CHECK-UPDATE" ]; then
 			alert="check-update"
 			alert="check-update"

+ 1 - 1
linuxgsm.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v23.5.2"
+version="v23.5.3"
 shortname="core"
 shortname="core"
 gameservername="core"
 gameservername="core"
 commandname="CORE"
 commandname="CORE"

+ 1 - 1
tests/tests_fctrserver.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v23.5.2"
+version="v23.5.3"
 shortname="fctr"
 shortname="fctr"
 gameservername="fctrserver"
 gameservername="fctrserver"
 commandname="CORE"
 commandname="CORE"

+ 1 - 1
tests/tests_jc2server.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v23.5.2"
+version="v23.5.3"
 shortname="jc2"
 shortname="jc2"
 gameservername="jc2server"
 gameservername="jc2server"
 commandname="CORE"
 commandname="CORE"

+ 1 - 1
tests/tests_mcserver.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v23.5.2"
+version="v23.5.3"
 shortname="mc"
 shortname="mc"
 gameservername="mcserver"
 gameservername="mcserver"
 commandname="CORE"
 commandname="CORE"

+ 1 - 1
tests/tests_ts3server.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v23.5.2"
+version="v23.5.3"
 shortname="ts3"
 shortname="ts3"
 gameservername="ts3server"
 gameservername="ts3server"
 commandname="CORE"
 commandname="CORE"