View Single Post
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