فهرست منبع

Added force-update option

The update checker is not detecting updates as SteamCMD is not always
returning the latest release number. I dont know why SteamCMD is doing
this.

I have added force-update which bypasses the check and just runs and
update without checking first.

I recommend using update once an hour and force-update daily.
Daniel Gibbs 11 سال پیش
والد
کامیت
0590ac47dd
2فایلهای تغییر یافته به همراه8 افزوده شده و 5 حذف شده
  1. 6 3
      functions/fn_getopt
  2. 2 2
      functions/fn_update_check

+ 6 - 3
functions/fn_getopt

@@ -2,7 +2,7 @@
 # LGSM fn_getopt function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 150414
+# Version: 060515
 
 # Description: getopt arguments.
 
@@ -16,6 +16,9 @@ case "$getopt" in
 		fn_restart;;
 	update)
 		fn_update_check;;
+	force-update)
+		forceupdate=1;
+		fn_update_check;;
 	validate)
 		fn_validate;;
 	monitor)
@@ -35,7 +38,7 @@ case "$getopt" in
 	auto-install)
 		fn_autoinstall;;
 	*)
-	echo "Usage: $0 {start|stop|restart|update|validate|monitor|email-test|details|backup|console|debug|install|auto-install}"
+	echo "Usage: $0 {start|stop|restart|update|force-update|validate|monitor|email-test|details|backup|console|debug|install|auto-install}"
 	exit 1;;
 esac
 exit
@@ -178,4 +181,4 @@ elif [ "${engine}" == "unreal" ]; then
 	fn_getopt_unreal
 else
 	fn_getopt_generic
-fi
+fi

+ 2 - 2
functions/fn_update_check

@@ -2,7 +2,7 @@
 # LGSM fn_update_check function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 220415
+# Version: 060515
 
 # Description: Checks if a server update is available.
 
@@ -284,7 +284,7 @@ fi
 fn_printdots "Checking for update"
 if [ "${gamename}" == "Teamspeak 3" ]; then
 	fn_teamspeak3_check
-elif [ "${engine}" == "goldsource" ]; then
+elif [ "${engine}" == "goldsource" ]||[ "${forceupdate}" == "1" ]; then
 	# Goldsource servers bypass checks as fn_steamcmdcheck does not work for appid 90 servers.
 	tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
 	if [ "${tmuxwc}" -eq 1 ]; then