ソースを参照

added updateonstart variable

this new variable will allow the script to check for updates when
running the start command
Daniel Gibbs 11 年 前
コミット
c1ad3e6716

+ 3 - 2
7DaysToDie/sdtdserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -17,7 +17,8 @@ steamuser="username"
 steampass="password"
 
 # Start Variables
-ip="0.0.0.0"  # can leave to answer on any IP
+ip="0.0.0.0"
+updateonstart="no"
 
 # Mod Variables
 

+ 3 - 2
Arma3/arma3server

@@ -4,7 +4,7 @@
 # Author: Daniel Gibbs
 # Contributor: Scarsz
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -17,8 +17,9 @@ email="email@example.com"
 steamuser="username"
 steampass="password"
 
-# Server IP
+# Start Variables
 ip="0.0.0.0"
+updateonstart="no"
 
 fn_parms(){
 parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods}"

+ 2 - 1
BladeSymphony/bsserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -23,6 +23,7 @@ port="27015"
 sourcetvport="27020"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
CounterStrike/csserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -22,6 +22,7 @@ maxplayers="16"
 port="27015"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
 fn_parms(){

+ 2 - 1
CounterStrikeConditionZero/csczserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -22,6 +22,7 @@ maxplayers="16"
 port="27015"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
 fn_parms(){

+ 2 - 1
CounterStrikeGlobalOffensive/csgoserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -34,6 +34,7 @@ port="27015"
 sourcetvport="27020"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 # Optional: Workshop Parameters
 # https://developer.valvesoftware.com/wiki/CSGO_Workshop_For_Server_Operators
 # To get an authkey visit - http://steamcommunity.com/dev/apikey

+ 2 - 1
CounterStrikeSource/cssserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -23,6 +23,7 @@ port="27015"
 sourcetvport="27020"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
DayOfDefeat/dodserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -22,6 +22,7 @@ maxplayers="16"
 port="27015"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
 fn_parms(){

+ 2 - 1
DayOfDefeatSource/dodsserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -23,6 +23,7 @@ port="27015"
 sourcetvport="27020"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
DeathmatchClassic/dmcserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -22,6 +22,7 @@ maxplayers="16"
 port="27015"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
 fn_parms(){

+ 2 - 1
DoubleActionBoogaloo/dabserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -23,6 +23,7 @@ port="27015"
 sourcetvport="27020"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
FistfulOfFrags/fofserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -23,6 +23,7 @@ port="27015"
 sourcetvport="27020"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
GarrysMod/gmodserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -29,6 +29,7 @@ port="27015"
 sourcetvport="27020"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
HalfLife2Deathmatch/hl2dmserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -23,6 +23,7 @@ port="27015"
 sourcetvport="27020"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
HalfLifeDeathmatch/hldmserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -22,6 +22,7 @@ maxplayers="16"
 port="27015"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
 fn_parms(){

+ 2 - 1
HalfLifeDeathmatchSource/hldmsserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 050515
+# Version: 090515
 
 #### Variables ####
 
@@ -23,6 +23,7 @@ port="27015"
 sourcetvport="27020"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
Insurgency/insserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -23,6 +23,7 @@ port="27015"
 sourcetvport="27020"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
JustCause2/jc2server

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -20,6 +20,7 @@ steampass=""
 maxplayers="10"
 port="7777"
 ip="0.0.0.0"
+updateonstart="no"
 
 fn_parms(){
 parms="--maxplayers ${maxplayers} --bindip ${ip} --bindport ${port}"

+ 2 - 1
KillingFloor/kfserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ steampass="password"
 # Start Variables
 defaultmap="KF-BioticsLab.rom"
 ip="0.0.0.0"
+updateonstart="no"
 
 fn_parms(){
 parms="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}"

+ 2 - 1
Left4Dead/l4dserver

@@ -4,7 +4,7 @@
 # Author: Daniel Gibbs
 # Contributor: Summit Singh Thakur
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -23,6 +23,7 @@ maxplayers="8"
 port="27015"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
Left4Dead2/l4d2server

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -22,6 +22,7 @@ maxplayers="8"
 port="27015"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
NS2Combat/ns2cserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -21,6 +21,7 @@ defaultmap="co_core"
 port="27015"
 maxplayers="24"
 ip="0.0.0.0"
+updateonstart="no"
 servername="NS2C Server"
 webadminuser="admin"
 webadminpass="admin"

+ 2 - 1
NaturalSelection2/ns2server

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -21,6 +21,7 @@ defaultmap="ns2_summit"
 port="27015"
 maxplayers="24"
 ip="0.0.0.0"
+updateonstart="no"
 servername="NS2 Server"
 webadminuser="admin"
 webadminpass="admin"

+ 2 - 1
NoMoreRoomInHell/nmrihserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -23,6 +23,7 @@ port="27015"
 sourcetvport="27020"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
OpposingForce/opforserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -22,6 +22,7 @@ maxplayers="16"
 port="27015"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
 fn_parms(){

+ 2 - 1
ProjectZomboid/pzserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -18,6 +18,7 @@ steampass=""
 
 # Start Variables
 ip="0.0.0.0"
+updateonstart="no"
 
 fn_parms(){
 parms=""

+ 2 - 1
RedOrchestra/roserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -19,6 +19,7 @@ steampass="password"
 # Start Variables
 defaultmap="RO-Arad.rom"
 ip="0.0.0.0"
+updateonstart="no"
 
 fn_parms(){
 parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}"

+ 2 - 1
Ricochet/ricochetserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -22,6 +22,7 @@ maxplayers="16"
 port="27015"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
 fn_parms(){

+ 2 - 1
SeriousSam3BFE/ss3sserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -18,6 +18,7 @@ steampass="password"
 
 # Start Variables
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/SeriousSam3BFE/help/DedicatedServer_Readme.txt
 fn_parms(){

+ 2 - 1
StarBound/sbserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -18,6 +18,7 @@ steampass="password"
 
 # Start Variables
 ip="0.0.0.0"
+updateonstart="no"
 
 fn_parms(){
 parms=""

+ 2 - 1
TeamFortress2/tf2server

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -23,6 +23,7 @@ port="27015"
 sourcetvport="27020"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){

+ 2 - 1
TeamFortressClassic/tfcserver

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -22,6 +22,7 @@ maxplayers="16"
 port="27015"
 clientport="27005"
 ip="0.0.0.0"
+updateonstart="no"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
 fn_parms(){

+ 4 - 1
TeamSpeak3/ts3server

@@ -3,7 +3,7 @@
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 030515
+# Version: 090515
 
 #### Variables ####
 
@@ -12,6 +12,9 @@
 emailnotification="off"
 email="email@example.com"
 
+# Start Variables
+updateonstart="no"
+
 # Server Details
 gamename="Teamspeak 3"
 servername="Teamspeak 3 Server"

+ 12 - 5
functions/fn_start

@@ -43,6 +43,12 @@ if [ ! -e "${servercfgfullpath}" ]; then
 	touch "${servercfgfullpath}"
 fi
 fn_logs
+
+# Will check for updates is updateonstart is yes
+if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]; then
+	fn_update_check
+fi
+
 fn_printdots "${servername}"
 fn_scriptlog "${servername}"
 sleep 1
@@ -102,6 +108,12 @@ if [ "${tmuxwc}" -eq 1 ]; then
 	echo -en "\n"
 	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}"
@@ -175,11 +187,6 @@ rm "${scriptlogdir}/.${servicename}-tmux-error.tmp"
 echo -en "\n"
 }
 
-# Will check for updates is updateonstart is yes
-if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]; then
-	fn_update_check
-fi
-
 if [ "${gamename}" == "Teamspeak 3" ]; then
 	fn_start_teamspeak3
 else