SCRIPT TO CHECK MULTICS IS RUNNING
Restart Automatically Multics if not running
###############################
"multicscheck.sh"
###############################
save the below code as multicscheck.sh
#!/bin/sh
#Script to check if the multics are running.
#Script is written by nickel edited by virk.
process=`ps auxwww | grep multics | grep -v grep | awk '{print $1}'`
if [ -z '$process' ]; then
echo "The MULTICS didn't worked so I restarted it!" >>/var/etc/multics.check
echo && date >>/var/etc/multics.check
sleep 5
/usr/local/bin/multics restart >>/dev/null
else echo "MULTICS is still OK!" >>/var/etc/multics.check
fi
###############################################################
just put
/usr/local/bin/
and give him 755!!
and the crontab u put this line:
* * * * * root /usr/local/bin/multicscheck.sh
1 comment:
noe working
Post a Comment