What's the idiomatic way? I'd prefer the most standard and yet simple way with fewer additional dependencies. Something like an alternative to systemd of Linux.
You can add script to cron every (in example) two minutes:
#!/bin/sh process = 'my-secret-service' # process name if ps ax | grep -v grep | grep $process then echo "$process is alive." else echo "$process is dead, but will be launched." /usr/local/bin/my-secret-service #launch command fi