Hello everybody,
Most of us have tryed to find a script for an autorestart of our MultiCS when sometimes it goes off itself .
I have this very simple script for you.
Go to your VPS via FTP,or WinSCP.
Than go through folder : etc
There find file : rc.local
Right click to edit it.
In that txt you will find this :
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
Change this script into this one by adding :
#!/bin/sh -eSave & Done! Restart your VPS and enjoy.
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/usr/local/bin/multics.x32 -C /var/etc/multics.cfg -b
exit 0
use a cron script!
save bellow file as /var/scripts/checkmultics1.sh
Code:
#!/bin/sh
if ps x |grep -v grep |grep -c multics.x32 >/dev/null
then
echo "Multics is UP... ok"
else
date=`date`
echo "Restarting Multics : $date" >> /tmp/checkmultics.log
echo "Multics... restarting"
/usr/local/bin/multics.x32 -C /var/etc/multics.cfg -b
fi
add this line on cron using
crontab -e
Code:
*/3 * * * * /var/scripts/./checkmultics1.sh >>/tmp/checkmultics.sh.log 2>&1
it will check every 3 minutes if mcs is up or not.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks