Basic script to keep alive your process.
-
Replace
myprocessin the script with your actual process name. -
Save the file as
keepalive.shsomewhere,/home/pi/keepalive.shis a good choice. -
Set up cron task by editing crontab with
crontab -e. Add* * * * * /home/pi/keepalive.sh- the script will be run once a minute and restart your process if it has failed.