View Single Post
Author Message
Mlk27
Veteran Member
Join Date: May 2008
Old 06-02-2012 , 00:42   [Linux] HLDSWatch - hl/srcds monitoring and auto restarter script
Reply With Quote #1

HLDSWatch
HLDS/SRCDS monitoring and auto restarter script


:: Intro ::
TL;DR..

Guy maintained bunch of game servers and hated dealing with stalled server processes which require his manual action to restart them. Wrote a bash script to automate those mundane routines so he could stop worrying..realized bash wasn't efficient enough for the job..rewrote the script from scratch with py. Satisfied with the result and posted it to public


:: Features ::
  • Supports both HLDS and SRCDS
  • Server status is determined by pinging server with UDP packet, instead of pid or process checking, for better reliability
  • Single py script thats run in the background..fire and forget
  • No webserver and database is required
  • Uses simple config file
  • On server crash, you can run your custom command or restart the server automatically
  • Logging to both console and file

:: Requirements ::
  • Linux
  • Python 2.6+ (installed by default on most Linux distros)
  • GNU screen
  • All servers must run from the same user account as HLDSWatch

:: Instructions ::
  1. Make sure you have all the requirements above
  2. Download the script and place it anywhere you want but it must be in the same user account as your servers
  3. Take a look at the sample config and edit it as needed
  4. Start the script with: screen -S hldswatcher ./hldswatch <config.cfg> (be sure to give the script chmod +x)

:: Download ::
Go to this Link (bitbucket)

Last edited by Mlk27; 10-23-2013 at 23:41. Reason: v2
Mlk27 is offline