Explorar el Código

Added unset updateonstart to resolve updater looping

updateonstart was causing the updater to loop if on. update now removes
the updateonstart var to prevent it from looping
Daniel Gibbs hace 10 años
padre
commit
e05a42daae
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      functions/update_check.sh

+ 4 - 1
functions/update_check.sh

@@ -2,7 +2,7 @@
 # LGSM update_check.sh function
 # LGSM update_check.sh function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
-lgsm_version="050216"
+lgsm_version="060216"
 
 
 # Description: Checks if a server update is available.
 # Description: Checks if a server update is available.
 
 
@@ -89,6 +89,7 @@ if [ "${requestrestart}" -ge "1" ]; then
 	sleep 1
 	sleep 1
 	echo -ne "\n"
 	echo -ne "\n"
 	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}:")
+	unset updateonstart
 	if [ "${tmuxwc}" -eq 1 ]; then
 	if [ "${tmuxwc}" -eq 1 ]; then
 		command_stop.sh
 		command_stop.sh
 		update_dl.sh
 		update_dl.sh
@@ -156,6 +157,7 @@ if [ "${currentbuild}" != "${availablebuild}" ]; then
 	fn_scriptlog "${currentbuild} > ${availablebuild}"
 	fn_scriptlog "${currentbuild} > ${availablebuild}"
 
 
 	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}:")
+	unset updateonstart
 	if [ "${tmuxwc}" -eq 1 ]; then
 	if [ "${tmuxwc}" -eq 1 ]; then
 		command_stop.sh
 		command_stop.sh
 		update_dl.sh
 		update_dl.sh
@@ -283,6 +285,7 @@ if [ "${currentbuilddigit}" -ne "${availablebuilddigit}" ]; then
 	fn_scriptlog "Current build: ${currentbuild}"
 	fn_scriptlog "Current build: ${currentbuild}"
 	fn_scriptlog "Available build: ${availablebuild}"
 	fn_scriptlog "Available build: ${availablebuild}"
 	fn_scriptlog "${currentbuild} > ${availablebuild}"
 	fn_scriptlog "${currentbuild} > ${availablebuild}"
+	unset updateonstart
 	info_ts3status.sh
 	info_ts3status.sh
 	if [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then
 	if [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then
 		update_dl.sh
 		update_dl.sh