# / Bin / bash # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ========================================= # | DNW Despe Networks | # ========================================= # | >>>>>>>> Start UT3 Script v2.2 >>>>>> | # | >>>>>>>> Http://www.despe.de >>>>>>>>>> | # | >>>>>>>> DO NOT EDIT, only if u know >>> | # | >>>>>>>> What are you doing! >>>>>>>>>> | # ========================================= # By Donzi, flip, jeppo token, # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Which user runs the server, NOT ROOT! USER = # Name of the server, short discription Accid = UT3 iCTF # GameSpy login. Please Create a log in your client, that update this setting! MyLogin = MYPASSWORD = # Port for the server SERVER PORT = 7777 QUERY PORT = 6500 # Where is the server installed ServerDir = "/ home / ~ user/ut3" # Serverip for multi home, Must Be insert! SERVERIP = "83.142.84.124" # Logs for the server, found in / home / ~ user/ut3/UTGame/Logs / LOG = "$ ACCID.log" Crashlog = "$ ACCID.crash.log" PIDFILE = "$ ServerDir / $ ACCID.pid" # Where are your ini to generate and later for read # You can find it in / UTGame / Config / your directory INIDIR = iCTF # SERVER DESCRIPTION = set this in the UTgame.ini! # ADMINPASSWORD = Sets of adminPassword ADMINPASSWORD = GAME # PASSWORD = Sets a game password GAME PASSWORD = # MAPS: DM Heatray, DM-ShangriLa, VCTF-Suspense, CTF Coret, War Torlan MAP = CTF Coret # GAME MODE = Sets the game mode (so servers will show up in the right catagory in the server browser) see above # DM = 0 # CTF = 1 # Warfare = 2 # VCTF = 3 # TDM = 4 Duel # = 5 GAME MODE = 1 # GAME: # = Deatmatch UTGame.UTDeathmatch # CTF = UTGameContent.UTCTFGame_Content # = Warfare UTGameContent.UTOnslaughtGame_Content # = VCTF UTGameContent.UTVehicleCTFGame_Content # TDM UTGame.UTTeamGame Duel # = UTGame.UTDuelGame GAME = UTGameContent.UTCTFGame_Content # Maxplayers = Maximum number of players on the server (overrides ini setting) Maxplayers = 10 # = MINNETPLAYERS Minimum number of players before a match starts (real players not bots) MinPlayers = 0 # BSHOULDADVERTISE = [True | False] show the server in the server browser INSERVERBROWSER = True # BISLANMATCH = [True | False] Is this a LAN only game? LANMATCH = False # BUSESSTATS = [True | False] report stats or not? STATS = True ALLOWJOININPROGRESS = True ALLOWINVITES = True USEPRESENCE = True ALLOWJOINVIAPRESENCE = True FORCERESPAWN = 0 # = 0 NUMPLAY DEDICATED # = [True | False] Changes dedicated server setting DEDICATED = True # BotSkill or Difficulty from 0-7 BOTSKILL = 2 # Mutator loaded? If Yes, set to 0 PURE SERVER = 1 GOAL # CORE = Sets the max frags / max caps before the server will change maps. CORE GOAL = 0 # TIME LIMIT = Sets the time limit in minutes for each map. TIME LIMIT = 20 # Mutator = # UTGame.UTMutator_SlowTimeKills # UTGame.UTMutator_BigHead # UTGame.UTMutator_FriendlyFire # UTGame.UTMutator_Handicap # UTGame.UTMutator_Instagib # UTGame.UTMutator_LowGrav # UTGame.UTMutator_NoPowerups # UTGame.UTMutator_NoTranslocator # UTGame.UTMutator_Slomo # UTGame.UTMutator_SpeedFreak # UTGame.UTMutator_SuperBerserk # UTGame.UTMutator_WeaponReplacement # UTGame.UTMutator_WeaponsRespawn #?? UTGame.UTMutator_Survival LOADEDMUTATORS = UTGame.UTMutator_NoTranslocator, UTGame.UTMutator_Instagib # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # DONT EDIT BELOW THIS LINE! Broken server is the reason! # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # START SERVER = "Binaries/ut3" SERVEREXE = "./ut3-bin" # Server Command Line SERVER COMMAND LINE = "server -Configsubdir = $ INIDIR-login = $ MyLogin-password = $ MYPASSWORD-port = $ SERVER PORT-query port = $ QUERY PORT-home = $ SERVERIP multi-log = $ LOG-nohomedir unattended " # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Temporarily out of order EXECMD = " while true do Olddir = `pwd` cd $ SERVEREXECDIR $ SERVER COMMAND LINE cd $ olddir sleep 5 mv $ LOG $ Crashlog done " # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Checking if ut3 is there and executable if [-f "$ ServerDir / $ SERVER START"] then if [! -X "$ ServerDir / $ SERVER START"] then echo-e "$ ServerDir / $ START SERVER file is not executable (chmod777)" echo-e "Please Change and start again" exit 2 fi else echo "Can not find the file $ ServerDir / $ SERVER START not!" echo "Should not agree the edit myself." exit 2 fi # Check ut3-bin is there and executable. if [-f "$ ServerDir / binaries / $ SERVEREXE"] then if [! -X "$ ServerDir / binaries / $ SERVEREXE"] then echo-e "binaries / $ SERVEREXE file is not executable (chmod777)" echo-e "Please Change and start again" exit 2 fi else echo "Can not find the file $ ServerDir / $ SERVER START not!" echo "Should not agree the edit myself." exit 2 fi case "$ 1" in start) echo-n "Starting $ accid dedicated server" if ps-ef | grep "$ SERVEREXE $ SERVER COMMAND LINE" | awk-F ""-v game = $ {realbin} 'BEGIN {status = 1}, $ 8 == game {status = 0} END {exit status}' , then echo-e "already runs" exit 0 else if [-f "$ LOG"] then cp $ LOG $ Crashlog fi ServerDir if $ / $ $ START SERVER SERVER COMMAND LINE 1 >> $ LOG 2> & 1 & sleep 3; then pid = `ps-ef | grep" $ SERVEREXE $ SERVER COMMAND LINE "| awk-F" "-v game = $ SERVEREXE 'BEGIN {status = 1}, $ 8 == game {print $ 2} END {exit status}'` echo $ {pid}> $ PIDFILE if [-f "$ PIDFILE"] && ps h `cat" $ PIDFILE "`> / dev / null, then echo-e ".... Started!" exit 0 else echo-e "will not start .... Could. dod_strategy the log file or run with debug!" exit 1 fi else echo "Error!" fi fi ;; stop) echo-n "Stopping $ accid dedicated server" if! ps-ef | grep "$ SERVEREXE $ SERVER COMMAND LINE" | awk-F ""-v game = $ SERVEREXE 'BEGIN {status = 1}, $ 8 == game {status = 0} END {exit status}', then echo "Server does not run or is crashed." else pid = `ps-ef | grep" $ SERVEREXE $ SERVER COMMAND LINE "| awk-F" "-v game = $ SERVEREXE 'BEGIN {status = 1}, $ 8 == game {print $ 2} END {exit status}'` echo $ {pid}> $ PIDFILE kill -9 `cat $ PIDFILE` if! ps-ef | grep $ ServerDir / $ SERVER START | awk-F ""-v game = $ ServerDir / $ SERVER START 'BEGIN {status = 1}, $ 8 == game {status = 0} END {exit status}'; then echo "stopped" exit 0 else echo "Can not Stop the server or is crashed" fi fi ;; status) echo "` date + "% Y-% m-% d% H:% M:% S" `$ accid check dedicated server status:" if! ps-ef | grep "$ SERVEREXE $ SERVER COMMAND LINE" | awk-F ""-v game = $ SERVEREXE 'BEGIN {status = 1}, $ 8 == game {status = 0} END {exit status}', then echo "Server does not run or is crashed ... Restart server, please Moment" $ 0 start else echo "server is running, no change." fi ;; check) echo-n "$ accid check dedicated server status:" if! ps-ef | grep "$ SERVEREXE $ SERVER COMMAND LINE" | awk-F ""-v game = $ SERVEREXE 'BEGIN {status = 1}, $ 8 == game {status = 0} END {exit status}', then echo "offline" else echo "online" fi ;; restart) echo-e "$ restart Accid dedicated server ..." $ 0 stop sleep & 3 & $ 0 start ;; debug) echo-n "Starting debug mode for $ accid dedicated server" if ps-ef | grep "$ SERVEREXE $ SERVER COMMAND LINE" | awk-F ""-v game = $ SERVEREXE 'BEGIN {status = 1}, $ 8 == game {status = 0} END {exit status}', then echo-e "already active" exit 3 else echo "- DEBUG will appear on screen!" echo "- Hit CTRL + C to kill the server!" ServerDir $ / $ $ START SERVER SERVER COMMAND LINE fi ;; *) echo "Usage: $ 0 {start | stop | restart | status | check | debug}" exit 1 esac