###############################
"multicscheck.sh"
###############################
just put
/usr/local/bin
and give him 755!!
and the crontab u put this line:
* * * * * root /usr/local/bin/multicscheck.sh
Bash
#!/bin/sh
#Script to check if the multics are running.
#Script is written by nickel.
process=`ps auxwww | grep multics.x64 | grep -v grep | awk '{print $1}'`
if [ -z '$process' ]; then
echo "The MULTICS didn't worked so I restarted it!" >>/usr/local/etc/multics/multics.check
echo && date >>/usr/local/etc/multics/multics.check
sleep 5
/etc/init.d/multics.x64 restart >>/dev/null
else echo "MULTICS is still OK!" >>/usr/local/etc/multics/multics.check
fi
Display More
Adjust file paths & names as necessary.
All credit to nickel.
