ilovelinux2006
Programmer
hey,
I have a game server running on my system. I have multiple games, and i crontab different files every couple minutes to start the games if they arent up already. It seems like my if statement isnt working right though, it keeps restarting every server, even if they are up. Can someone help me with my script? :
#!/bin/sh
process=`ps auxw | grep "mohaa_lnxded +exec server.cfg"?`
if [ -z "$process" ]; then
cd /home/user29/mohaa/
./mohaa_lnxded +exec server.cfg
fi
(I have multiple IP address and servers on my machine, so I have different server.cfg for each user (server1.cfg,server2.cfg, ect). Right now Im only testing the one you see above.
THANKS!!!!!
I have a game server running on my system. I have multiple games, and i crontab different files every couple minutes to start the games if they arent up already. It seems like my if statement isnt working right though, it keeps restarting every server, even if they are up. Can someone help me with my script? :
#!/bin/sh
process=`ps auxw | grep "mohaa_lnxded +exec server.cfg"?`
if [ -z "$process" ]; then
cd /home/user29/mohaa/
./mohaa_lnxded +exec server.cfg
fi
(I have multiple IP address and servers on my machine, so I have different server.cfg for each user (server1.cfg,server2.cfg, ect). Right now Im only testing the one you see above.
THANKS!!!!!