Very nice Neph! I would most definitely use it...If I wasn't running Windoze.
On Thu, Jun 5, 2008 at 7:48 PM, Nephyrin Zey <[EMAIL PROTECTED]> wrote: > I should also mention, I'm going to be releasing a plugin soon that > lets you set a cvar to make -autoupdate exit the game immediately > instead of at map change. > > - Neph > > On Thu, Jun 5, 2008 at 4:44 PM, Nephyrin Zey <[EMAIL PROTECTED]> > wrote: > > Hey guys, > > > > I've written a srcds_run replacement script called 'nemrun' along with > > a helper python script 'srcupdatecheck'. This script is meant to be a > > no-nonsense srcds_run replacement with some advanced features: > > - Able to handle -autoupdate, including on orangebox games and setups > > with ./steam in an unusual place > > > > - Able to update servers that share a install directory: > > - First server to detect an update on restart (from > > map-change-restart provided by -autoupdate, or due to a manual 'quit' > > or other exit/crash) will 'lock' the directory with an update.lock > > file > > - Other servers (running in screens) are sent a 'quit' message > > - Other servers see the first server is updating them and wait for > > it to complete > > - Script can be configured to retry a failed update x times over y > seconds > > - Other servers periodically make sure the server/runscript doing > > the update hasn't crashed (and take over if so) > > - Once update has been complete lock is removed and all servers > > restart in unison > > > > - Logs restart/update events into a separate reboot.log file, which > > can be be named statically or given dated names (such as > > rebootlogs/reboot_YYYYMMDDHHmmSS.log) > > > > - Core files can be turned on and named dynamically (again with the > > option of including YYYY/MM/DD/etc datestamps and folder prefixes) > > > > - the '$GAME/downloads' folder can be optionally 'cleaned' upon > > reboot, by deleting orphans (files without associated .ztmp or vice > > versa) as well as all files over X days old. > > > > - (minor) $GAME/addons/bin is added to the bin search path, so you can > > make that folder and put binaries (dll's/so's) for addons/extensions > > in there instead of polluting the bin (or orangebox/bin) folder. > > > > == > > Because this script must be able to check for updates without actually > > performing the updates (because it might need to kill other servers > > running on the same install path) I have included my 'srcupdatecheck' > > script. This script, which requires Python 2.3+ be installed (it will > > be on most server systems), takes a steam.inf file as input > > (./srcupdatecheck path/to/steam.inf) and sends a packet to the master > > server to see if it is up to date. It is a rather crude method, but > > proves very reliable and quick (can provide an update yes/no in 3 > > seconds as opposed to waiting 30+ for the hldsupdatetool, which also > > would go ahead and perform an update without prompting) > > > > === > > > > REQUIREMENTS: > > - bash (other modern shells probably work, but much of the syntax wont > > work with a standard 'sh' shell. #!/bin/bash is specified in the > > header, so when you run the script from any shell it will > > automatically be put in its own bash sub-instance) > > - Python 2.3-2.5 (others not tested) with standard (regex/socket/etc) > > libraries for srcdsupdatecheck (srcdsupdatecheck required if using > > -autoupdate) > > - A willingness to report bugs to me (this is beta) > > > > You MUST do ./nemrun --help and read the instructions - it uses > > several command line parameters not used in srcds_run. > > > > Latest Beta available here: (you need: nemrun, srcupdatecheck) > > http://www.nephyrin.net/tools/nemrun/latest-beta/ > > > > === > > > > INSTRUCTIONS > > 1. Get nemrun and srcupdatecheck from > > http://www.nephyrin.net/tools/nemrun/latest-beta/ > > 2. "chmod +x nemrun srcupdatecheck" > > 3. "./nemrun --help" > > > > Example launch screen (taken from my test server): > > > > screen -d -m -U -S testing ./nemrun -nemlog > > "runlogs/Testing_%Y%m%d%H%M%S.log" \ > > -cleandownloads 10 -autoupdate -steamdir ../.. -srvdir tfbase \ > > -updatetries 3 -updatedelay 15 -sharedscreens proving,stomping \ > > -corefile "cores/Testing_%Y%m%d%H%M%S.core" \ > > \ > > -game tf +exec testing.cfg -ip 75.125.209.5 -port 27015 \ > > +maxplayers 32 +map pl_goldrush +servercfgfile testing.cfg \ > > +mapcyclefile map_testing.txt +motdfile testingmotd.txt \ > > +sv_logsdir logs_testing +log on \ > > +fps_max 128 > > > > THINGS TO NOTE: > > - Note the 'required' command switches when using, say, -autoupdate. > > It wont work without -srvdir / -steamdir set. The script will warn you > > when you set things wrong > > - Both -nemrun and -corefile take 'date' style date strings in > > addition to regular strings. Type "man date" for more information and > > see my example command. > > - 'steamdir' is the path to steam from the server directory or an > absolute path. > > - 'srvdir' is the path to the ROOT of the server (if you have > > /path/server/orangebox/tf, the srvdir is '/path/server') FROM the > > steam dir. Both of these can be absolute paths if you want to be safe. > > - 'sharedscreens' is a comma delimited list of other 'screens' (as > > named by "screen -S name") running servers ON THIS SAME INSTALL PATH > > that are USING THIS SAME RUNSCRIPT. You MUST specify these if you want > > updates to work IF you're running multiple servers from the same > > install path, so it knows to kill them before trying to update the > > shared directory. Feel free to message me if this is confusing. For > > instance, if you run servers in screens named "a" "b" and "sam", then > > the server in screen "a" should have "-sharedscreens b,sam" (assuming > > they're all running out of myservers/serverblah/) > > - Servers in SEPARATE directories/installs should NOT use > > -sharedscreens, as they wont be affected if another server is updating > > its own independant directory. > > > > == > > CONTACT ME > > with bugs or suggestions or questions or whatever. You may respond to > > this thread, or IM me at: > > Nephyrin (Skype/AIM) > > [EMAIL PROTECTED] (MSN/XMPP(Jabber)) > > [EMAIL PROTECTED] (GTalk/XMPP(Jabber)) > > > > I'm on nearly 24/7 > > > > Remember this is *BETA* quality, I've been using it on my 32x servers > > for some days, but that doesn't guarantee it wont break stuff ;-P > > > > - Neph > > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlds_linux > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux