Archive for September, 2007

Auto restart a process in Linux

Sunday, September 2nd, 2007

Here’s the code:
#!/bin/bash
if [ ! "$(pidof program" ]
then
# echo “Process Dead”
‘location of program’
else
# echo “Process Alive”
echo “”
fi
Now just add this command to the crontab and you’re done.

about my life, my work, my interests, technical stuff, ….