hi all!
Tutorial how to create multics running check script and if multics stops then that script runs multics self up again
1) Log over putty to server as root and give next commands to create the script:
cd /etc
touch multics.sh
chmod 777 multics.sh
nano multics.sh
Next copy all that inside the multics.sh:
Next hit from your keyboard ctrl+o to save and ctrl+x to exit.PHP Code:
#!/bin/bash
if ! ps -C multics.x86 > /dev/null
then
/usr/local/bin/multics.x86
fi
2) Now we need make a cron job what executes the script every 1, or from you set minutes. Please give next commands to make a cron job:
cd /etc
export EDITOR="nano"
crontab -e
There add new line to the job list so:
Hit ctrl+o to save and ctrl+x to exit and test the script out if it is working. Kill multics.x86 from /usr/local/bin and wait 1 minutes and multics should go self up again.PHP Code:
*/1 * * * * /etc/multics.sh
Note: this script is also works when linux OS restarted
good
but to run each minute you have to change the crone command to
PHP Code:
* * * * * /etc/multics.sh
merci pour votre aide
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks