My pimatic crashed a couple of times for no reason (before the latest update)…here is a quick solution to keep pimatic running.
This will check every 5 minutes if pimatic is still running, if not restart it & send you an email:
*/5 * * * * (ps ax | grep 'pimatic' | grep -v 'grep' || (/etc/init.d/pimatic start && echo "MESSAGE" | mail -s "SUBJECT" your@email.com)) >/dev/null 2>&1
Simply put above snippet in root’s crontab (sudo crontab -e
) it needs to be in ONE SINGLE LINE!
Please note, if you need to edit your config etc. you’ll need to comment out the line in crontab!