uniq_

cron restart process if it died

I just put something like this in my crontab. It's quick and dirty, but it works.

*/1 * * * * [ -z "`ps -ef | grep -v grep | grep '<command>'`" ] && <command>

For those rare cases when writing a daemon just does not pay off.

written by uniq on 2016-02-27