I\'m trying to ensure a script remains running on a development server. It collates stats and provides a web service so it\'s supposed to persist, yet a few times a day, it
It's even simplier:
#!/bin/bash export DISPLAY=:0 process=processname makerun="/usr/bin/processname" if ! pgrep $process > /dev/null then $makerun & fi
You have to remember though to make sure processname is unique.