AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   HL1 Servers (HLDS) (https://forums.alliedmods.net/forumdisplay.php?f=131)
-   -   [Linux] HLDSWatch - hl/srcds monitoring and auto restarter script (https://forums.alliedmods.net/showthread.php?t=186620)

Mlk27 06-02-2012 00:42

[Linux] HLDSWatch - hl/srcds monitoring and auto restarter script
 
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 :crab:
  • 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)

^SmileY 06-02-2012 00:58

Re: [Linux] HLDSWatch
 
Down?

Mlk27 06-02-2012 12:42

Re: [Linux] HLDSWatch
 
First post updated with instructions, also script files attached. Have fun testing it. Feel free to post any suggestions, requests or report bugs and errors in the script

kileedyg 06-05-2012 05:13

Re: [Linux] HLDSWatch
 
yay python, good job!

BeasT 06-08-2012 17:35

Re: [Linux] HLDSWatch
 
Can you make it so that it would be possible to specify a .sh file with all the needed launch parameters so I wouldn't have to write them in the scripts config file? For example, only leave the path like this: path = /home/path/to/hlds3/dir/start.sh And the script would use it to relaunch the server.

Mlk27 06-11-2012 07:59

Re: [Linux] HLDSWatch
 
Quote:

Originally Posted by BeasT (Post 1725215)
Can you make it so that it would be possible to specify a .sh file with all the needed launch parameters so I wouldn't have to write them in the scripts config file? For example, only leave the path like this: path = /home/path/to/hlds3/dir/start.sh And the script would use it to relaunch the server.

Hmm maybe, but why'd you want to place launch params in launcher script? I thought having all server launch params in a single config is much more convenient :3

By the way, next version will include support for SRCDS.

BeasT 06-11-2012 15:20

Re: [Linux] HLDSWatch
 
Not for me. I have all launch parameters in seperate script for each server. That way it's more easy to start the them. So if I'd change those scripts, I would have to change the params in HLDSWatch config also.

BAMHS 07-30-2013 18:23

Re: [Linux] HLDSWatch
 
was working fine when i tested, but when put on live servers with people, server full, server kept restarting every mins with it and was restarting 2 or 3 other servers that usually dont crash every min too! and lagging servers cuz indefinitely restarting one server or 2.

Mlk27 10-11-2013 02:42

Re: [Linux] HLDSWatch
 
So I revisited the restarter script and refactored few things while adding support for srcds along the way..I'm finalizing v2 as I speak and I'm in need of few testers to help me testing the new version since I don't have servers anymore. If you're interested, hit me a PM

Hackerpcs 10-17-2013 18:59

Re: [Linux] HLDSWatch
 
Windows version anytime soon?


All times are GMT -4. The time now is 17:23.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.