:: How to create script for auto restart daemon if it down
+ create auto restart daemon script (nginx)

add the script, like these:

#!/bin/bash
alwaysup=ps aux | grep -v grep | grep -c nginx
if [ $alwaysup -le 0 ]
then
/etc/init.d/nginx restart
fi

press ctrl+d for exit
+ make the script executable

+ add to cron
crontab -e

 
:: Links
+ Google
+ NixCraft