From 4a5e4cffb64d56e15a69e63d1642f37158559050 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 3 Jun 2015 18:25:16 +0100 Subject: [PATCH] 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. --- functions/fn_start | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/functions/fn_start b/functions/fn_start index 3fd125fa9..f4d13b45c 100644 --- a/functions/fn_start +++ b/functions/fn_start @@ -2,7 +2,7 @@ # LGSM fn_start function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -# Version: 310515 +# Version: 030615 # Description: Starts the server. @@ -87,6 +87,12 @@ fn_check_tmux if [ "${gamename}" != "Mumble" ]; then fn_check_steamcmd 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}:") if [ "${tmuxwc}" -eq 0 ]; then fn_scriptlog "Rotating log files" @@ -105,11 +111,6 @@ if [ "${tmuxwc}" -eq 1 ]; then exit fi -# Will check for updates is updateonstart is yes -if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]; then - fn_update_check -fi - # Create lock file date > "${rootdir}/${lockselfname}" cd "${executabledir}"