Experienced Elementalist
- Joined
- Sep 8, 2008
- Messages
- 213
- Reaction score
- 17
how to script this?
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!*/1 * * * * root /home/cabal/check_daemon.sh
*/1 * * * * root /home/cabal/check_daemon.sh
#!/bin/sh
daemons=`cat /etc/cabal/server_list | grep -v ^#`
logfile=/home/cabal/check_daemon.log
for daemon in $daemons; do
#echo "`date`: check $daemon" >> $logfile
ret=`ps aux | grep $daemon | grep ^cabal | grep -v grep`
if [ -z "$ret" ]; then
echo "`date`: $daemon starting" | tee -a $logfile
/sbin/service $daemon start
fi
done
sir chump i already did that but seems its not working everytime the channel crush it didnt restart
[root@cabal ~]# service chk_cabal status
chk_cabal: unrecognized service
[root@cabal ~]#
sir cyph sorry for the double post i already edit my post i dont know what happen