This one works for us.

#!/bin/sh

hldir="/path/to/hlds_l/"
cd $hldir
process=`ps auxwww | grep ./hlds_run | grep -v grep | awk '{print $6}'`

if [ -z $process ]; then
  echo "Couldn't find CS running. Restarting it"
  nohup /path/to/hlds_l/hl_start_script.sh
  echo "ok"
fi

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 07 August 2003 19:28
To: [EMAIL PROTECTED]
Subject: RE: [hlds_linux] Restart Cron



>-----Original Message-----
>Hello
>
>It seems a PATH problem..
>
>try
>/bin/ps -ux | /bin/grep hlds_run | /bin/grep -v grep | path_to_tr/tr -s
>" " | /bin/cut -d " " -f2
>
>
>Nuno Fernandes


Well I tried that and it still thinks nothing is running when it's run
via
cron. Of couse when I run it via  the user it sees the process fine. I
would
almost think the cron is not being run as the user but it has to be
since
the new hlds it starts starts as the user.

Also on the killall problem. I even took that to the full path. I found
out
one of the lines works as the user and the other doesn't. Lets say I
have
these two processes.

tusers  2172  0.0  0.1   896  640  ??  I    11:30PM   0:00.00 /bin/sh
./hlds_run -game .....
tusers  2179  0.2  5.9 66636 61856  ??  S    11:30PM  27:26.93 ./hlds
-game
cstrike ....+maxplayers 12 +m

killall -9 hlds_run (this one will not kill it's line)
killall -9 hlds (this onw will kill it's line when run as user)

I am lost as to why.

Jeremy


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

Reply via email to