Raised This Month: $12 Target: $400
 3% 

[Linux] HLDSWatch - hl/srcds monitoring and auto restarter script


Post New Thread Reply   
 
Thread Tools Display Modes
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 10-18-2013 , 01:47   Re: [Linux] HLDSWatch
Reply With Quote #11

Where I can download it?
And how I can check installed Python 2.6+ on my machine?

Last edited by Phant; 10-18-2013 at 01:49.
Phant is offline
Send a message via ICQ to Phant
Mlk27
Veteran Member
Join Date: May 2008
Old 10-23-2013 , 03:15   Re: [Linux] HLDSWatch
Reply With Quote #12

Quote:
Originally Posted by Phant View Post
Where I can download it?
And how I can check installed Python 2.6+ on my machine?
I just pushed the script to my bitbucket. Link to download is in the first post

Quote:
Originally Posted by Hackerpcs View Post
Windows version anytime soon?
Probably but don't hold your breath for it I think I saw a gui hlds / srcds monitoring program for windows somewhere in this section the other day. You might want to check that one out
__________________
HLDSWatch - HLDS monitoring and auto restarter script
Mlk27 is offline
vase070
Senior Member
Join Date: Jun 2011
Old 02-04-2014 , 00:51   Re: [Linux] HLDSWatch - hl/srcds monitoring and auto restarter script
Reply With Quote #13

ok so im a little confused here i hope you will help me so this is what i did
first i uploaded the script to my server [running debian 7] in my user witch my server is and put it in a new folder called hldswatch after that i reconfigured the servers.conf as you said like this

Code:
# Restart server on crash or when no response is received
# If autorestart is enabled; screen, command and startdir options are required to fill
# screen   : name for screen session
# command  : your server start command
# startdir : server dir path that contains hlds/srcds executable
[95.86.??.??:27015]
engine=goldsrc
autorestart=y
screen=cs_pub1
command=./hlds_run -game cstrike +ip 95.86.??.?? +port 27015 +maxplayers 31 +map de_dust2 +mapchangecfgfile server.cfg
startdir=/home/adminuser/servers/pub/

# Same as above
# [192.168.1.2:27016]
# engine=source
# autorestart=y
# screen=tf_pub1
# command=./srcds_run -game tf -etcetc
# startdir=/home/gameserver/pub/srcds_tf_pub1/orangebox

# Do not restart server
# Execute your own command when server crashes or doesn't respond
# [192.168.1.2:27017]
# engine=source
# autorestart=n
# command=send-alert-to-email.sh

# Do nothing when server crashes or doesn't respond
# Log message only
# [192.168.1.2:27018]
# engine=source
# autorestart=n
i commented the other lines because i dont have any srcds servers is that ok or should i leave them the way they were ?

and i was a bit confused were you said

Code:
Start the script with: screen -S hldswatcher ./hldswatch <config.cfg>
what config.cfg do you mean the servers.conf ? is this the way im suppose to start the script

Code:
screen -S hldswatcher ./hldswatch servers.conf
sorry for being a noob but i was really confused
vase070 is offline
Ra7eem
BANNED
Join Date: Feb 2014
Location: Egypt
Old 02-06-2014 , 18:50   Re: [Linux] HLDSWatch - hl/srcds monitoring and auto restarter script
Reply With Quote #14

hlds server restart automuticly on the linux system not need script
Ra7eem is offline
Hackerpcs
Member
Join Date: Jul 2012
Location: Greece
Old 02-17-2014 , 19:00   Re: [Linux] HLDSWatch - hl/srcds monitoring and auto restarter script
Reply With Quote #15

Quote:
Originally Posted by vase070 View Post
and i was a bit confused were you said

Code:
Start the script with: screen -S hldswatcher ./hldswatch <config.cfg>
what config.cfg do you mean the servers.conf ? is this the way im suppose to start the script

Code:
screen -S hldswatcher ./hldswatch servers.conf
sorry for being a noob but i was really confused
I wonder that too, how to use the script.

Last edited by Hackerpcs; 02-17-2014 at 19:00.
Hackerpcs is offline
Mlk27
Veteran Member
Join Date: May 2008
Old 02-28-2014 , 21:22   Re: [Linux] HLDSWatch - hl/srcds monitoring and auto restarter script
Reply With Quote #16

Oshi..didn't expect people would dig out this topic again

Quote:
Originally Posted by vase070 View Post
i commented the other lines because i dont have any srcds servers is that ok or should i leave them the way they were ?
That's fine, the script ignores any lines starting with #

Quote:
Originally Posted by vase070 View Post
what config.cfg do you mean the servers.conf ? is this the way im suppose to start the script

Code:
screen -S hldswatcher ./hldswatch servers.conf
Yes. That config.cfg refers to config file that supplies server start commands. You can name the file anything.
__________________
HLDSWatch - HLDS monitoring and auto restarter script
Mlk27 is offline
Mlk27
Veteran Member
Join Date: May 2008
Old 02-28-2014 , 21:44   Re: [Linux] HLDSWatch - hl/srcds monitoring and auto restarter script
Reply With Quote #17

Quote:
Originally Posted by Ra7eem View Post
hlds server restart automuticly on the linux system not need script
Correct but the restart routine in the hlds_run script would only work if hlds exits its process on crash, which unfortunatelty isn't always the case on mod servers because more often that not, these servers just go stalled and don't exit their server process when they crash
__________________
HLDSWatch - HLDS monitoring and auto restarter script
Mlk27 is offline
Rirre
Veteran Member
Join Date: Nov 2006
Old 03-05-2014 , 13:44   Re: [Linux] HLDSWatch - hl/srcds monitoring and auto restarter script
Reply With Quote #18

Code:
Cannot exec: './hldswatch': No such file or directory
Even though it's pointing right.
Tried with and without .py extension in the cmd.

Code:
cd hlds
screen -S hldswatcher ./hldswatch.py servers.conf
Both hldswatch.py and servers.conf are in /hlds/ folder with hlds_run executable file.
So running command:
Code:
screen -A -m -d -S hlds ./hlds_run
works fine.

In case, yes, I executed chmod +x hldswatch.py
It worked. But not to run it somehow.

Ubuntu 32-bit
Python 2.7

EDIT:
Code:
$ type -P python
$ which python

Code:
/usr/bin/python
Googled ".py not executable linux", some had the same issue with #!/usr/bin/python, but none of the replies I've found doesn't solve it. :/

Last edited by Rirre; 03-07-2014 at 05:19.
Rirre is offline
Hackerpcs
Member
Join Date: Jul 2012
Location: Greece
Old 03-07-2014 , 00:58   Re: [Linux] HLDSWatch - hl/srcds monitoring and auto restarter script
Reply With Quote #19

For me
Code:
screen -S hldswatch ./hldswatch.py servers.conf
works for Ubuntu 12.04 Desktop 64bit with execute rights to hldswatch.py.

Last edited by Hackerpcs; 03-07-2014 at 00:58.
Hackerpcs is offline
micazoid
Veteran Member
Join Date: Oct 2010
Location: Munich - Germany
Old 09-08-2014 , 10:10   Re: [Linux] HLDSWatch - hl/srcds monitoring and auto restarter script
Reply With Quote #20

Quote:
Originally Posted by Rirre View Post
Code:
Cannot exec: './hldswatch': No such file or directory
Even though it's pointing right.
Tried with and without .py extension in the cmd.

Code:
cd hlds
screen -S hldswatcher ./hldswatch.py servers.conf
Both hldswatch.py and servers.conf are in /hlds/ folder with hlds_run executable file.
So running command:
Code:
screen -A -m -d -S hlds ./hlds_run
works fine.

In case, yes, I executed chmod +x hldswatch.py
It worked. But not to run it somehow.

Ubuntu 32-bit
Python 2.7

EDIT:
Code:
$ type -P python
$ which python

Code:
/usr/bin/python
Googled ".py not executable linux", some had the same issue with #!/usr/bin/python, but none of the replies I've found doesn't solve it. :/
Had the same Problem -> No such file or directory

Try dos2unix

EDIT:
Also make sure following:
Logfile goes to a folder which is owned by user (chown user:group file/directory)
Do not sudo (had a good laugh with "I got a bad feeling about this")
Directory has to have 775

Got it up now and now I am waiting that my server freezes again (that lazy bastard ;) )
__________________

Last edited by micazoid; 09-08-2014 at 10:23.
micazoid is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:48.


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