Below is a srcds manager script that I've been using for awhile now to take care of my srcds installations. I figure someone else might find it useful.
It is a bash script. Linux only, no Windows.
wrench script
http://pastebin.com/CS81FnF9
README file
http://pastebin.com/mHWJm62R
bash-autocompletion script (makes tab-completion work)
http://pastebin.com/NhEGLWG8
Sample DB
http://pastebin.com/eMKUsADN
Download like so:
wget http://pastebin.com/download.php?i=CS81FnF9 -O- | dos2unix > wrench
wget http://pastebin.com/download.php?i=mHWJm62R -O- | dos2unix > wrench_README.txt
wget http://pastebin.com/download.php?i=NhEGLWG8 -O- | dos2unix > wrench.bash-autocompletion
Note that Pastebin inserts MS-DOS line feeds into their files, so you need to use a tool like dos2unix on the files after downloading.
Do "wrench help" for command examples.
To set up wrench and install a new server, do "wrench setup", and then "wrench install" when all setup requirements are met.
Read the README file for more information about installation. There are a number of dependencies which you will probably have to install to make it work.
--
Notable features:
wrench takes care of your installations from first-time install, startup, updates, stops, reconfiguration, all the way to uninstallation.
wrench was designed for maintaining multiple srcds installations on a single host.
Mandatory symbolically linked installations. All servers are linked servers.
Linked installations use "master" installations as their reference.
For each game type, you only need to download updates once, instead of N* the number of servers you have installed.
New installations take seconds to create once a master has been installed, because nothing needs to be downloaded.
Linked installations require dramatically less filesystem space than standard installations and are easier to backup and move around.
Fully automatic updates for all installed srcds server types.
Automatic update management of each linked installation, including warning users and restarting each installation after an autoupdate.
wrench uses tmux as a terminal multiplexer instead of screen.
wrench can start and stop all of your srcds installations in a single command.
wrench keeps configuration about each game type and server installation in a tiny SQLite database.
wrench has an autocleanup function to clean up old replay files, logs, download cache, and more.
wrench includes a srcds_run replacement called wrench_run mode.
wrench_run features crash notifications by email, automatic crash restarts, and a watchdog process which will restart hung/frozen servers.
wrench_run will automatically stop a server if it crashes too much, to protect your host from runaway crash-restarts.
--
user@host-->wrench help
wrench is a Source Dedicated Server (srcds) management tool for Valve's srcds-based game servers.
For more information, including full documentation, go here:
http://forums.srcds.com/viewpost/118741
Single-argument commands:
wrench install
wrench uninstall
wrench list
wrench listplayers
wrench autocleanup
wrench autoupdate
wrench bootstart
wrench stopall
wrench setup
Server-specific commands:
wrench start MyTarget
wrench stop MyTarget
wrench stopnow MyTarget
wrench restart MyTarget
wrench restartnow MyTarget
wrench console MyTarget
wrench status MyTarget
wrench showconfig MyTarget
wrench reconfig MyTarget
wrench rename MyTarget
wrench relink MyTarget
wrench delink MyTarget
wrench lockdown-master MyTarget
wrench unlock-master MyTarget
wrench update MyTarget
wrench updatenow MyTarget
wrench update-validate MyTarget
wrench update-validatenow MyTarget
wrench gametype MyTarget
It is a bash script. Linux only, no Windows.
wrench script
http://pastebin.com/CS81FnF9
README file
http://pastebin.com/mHWJm62R
bash-autocompletion script (makes tab-completion work)
http://pastebin.com/NhEGLWG8
Sample DB
http://pastebin.com/eMKUsADN
Download like so:
wget http://pastebin.com/download.php?i=CS81FnF9 -O- | dos2unix > wrench
wget http://pastebin.com/download.php?i=mHWJm62R -O- | dos2unix > wrench_README.txt
wget http://pastebin.com/download.php?i=NhEGLWG8 -O- | dos2unix > wrench.bash-autocompletion
Note that Pastebin inserts MS-DOS line feeds into their files, so you need to use a tool like dos2unix on the files after downloading.
Do "wrench help" for command examples.
To set up wrench and install a new server, do "wrench setup", and then "wrench install" when all setup requirements are met.
Read the README file for more information about installation. There are a number of dependencies which you will probably have to install to make it work.
--
Notable features:
wrench takes care of your installations from first-time install, startup, updates, stops, reconfiguration, all the way to uninstallation.
wrench was designed for maintaining multiple srcds installations on a single host.
Mandatory symbolically linked installations. All servers are linked servers.
Linked installations use "master" installations as their reference.
For each game type, you only need to download updates once, instead of N* the number of servers you have installed.
New installations take seconds to create once a master has been installed, because nothing needs to be downloaded.
Linked installations require dramatically less filesystem space than standard installations and are easier to backup and move around.
Fully automatic updates for all installed srcds server types.
Automatic update management of each linked installation, including warning users and restarting each installation after an autoupdate.
wrench uses tmux as a terminal multiplexer instead of screen.
wrench can start and stop all of your srcds installations in a single command.
wrench keeps configuration about each game type and server installation in a tiny SQLite database.
wrench has an autocleanup function to clean up old replay files, logs, download cache, and more.
wrench includes a srcds_run replacement called wrench_run mode.
wrench_run features crash notifications by email, automatic crash restarts, and a watchdog process which will restart hung/frozen servers.
wrench_run will automatically stop a server if it crashes too much, to protect your host from runaway crash-restarts.
--
user@host-->wrench help
wrench is a Source Dedicated Server (srcds) management tool for Valve's srcds-based game servers.
For more information, including full documentation, go here:
http://forums.srcds.com/viewpost/118741
Single-argument commands:
wrench install
wrench uninstall
wrench list
wrench listplayers
wrench autocleanup
wrench autoupdate
wrench bootstart
wrench stopall
wrench setup
Server-specific commands:
wrench start MyTarget
wrench stop MyTarget
wrench stopnow MyTarget
wrench restart MyTarget
wrench restartnow MyTarget
wrench console MyTarget
wrench status MyTarget
wrench showconfig MyTarget
wrench reconfig MyTarget
wrench rename MyTarget
wrench relink MyTarget
wrench delink MyTarget
wrench lockdown-master MyTarget
wrench unlock-master MyTarget
wrench update MyTarget
wrench updatenow MyTarget
wrench update-validate MyTarget
wrench update-validatenow MyTarget
wrench gametype MyTarget