Has anyone written a self-watchdog script and can share the way it was resolved? I have DD-WRT on one of the routers and can make only one startup script. The problem is doesn't get run. If I log on by telnet and start it manually it works great. So I need to add a cron rule to run it, but not run more then once. I was thinking about using:
if [`ps | grep [c]ustom.sh` -gt 1]; then exit; else ... fi
Do you know any other way to do this?