Procházet zdrojové kódy

Moved updateonstart code before the console log is moved

Moved updateonstart code before the console log is moved to prevent a
bug that meant fn_update_check was unable to to check logs for updates.
Daniel Gibbs před 11 roky
rodič
revize
4a5e4cffb6
1 změnil soubory, kde provedl 7 přidání a 6 odebrání
  1. 7 6
      functions/fn_start

+ 7 - 6
functions/fn_start

@@ -2,7 +2,7 @@
 # LGSM fn_start function
 # LGSM fn_start function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
-# Version: 310515
+# Version: 030615
 
 
 # Description: Starts the server.
 # Description: Starts the server.
 
 
@@ -87,6 +87,12 @@ fn_check_tmux
 if [ "${gamename}" != "Mumble" ]; then
 if [ "${gamename}" != "Mumble" ]; then
 	fn_check_steamcmd
 	fn_check_steamcmd
 fi
 fi
+
+# Will check for updates if updateonstart is yes
+if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]; then
+	fn_update_check
+fi
+
 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
 if [ "${tmuxwc}" -eq 0 ]; then
 if [ "${tmuxwc}" -eq 0 ]; then
 	fn_scriptlog "Rotating log files"
 	fn_scriptlog "Rotating log files"
@@ -105,11 +111,6 @@ if [ "${tmuxwc}" -eq 1 ]; then
 	exit
 	exit
 fi
 fi
 
 
-# Will check for updates is updateonstart is yes
-if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]; then
-	fn_update_check
-fi
-
 # Create lock file
 # Create lock file
 date > "${rootdir}/${lockselfname}"
 date > "${rootdir}/${lockselfname}"
 cd "${executabledir}"
 cd "${executabledir}"