I have written a simple NodeJS application and I would like to have FreeBSD launch it, and if the application ever crashes or terminates for any reason, relaunch it. The goal is for this application to be running as close to “eternally” as possible.
I think that daemon might do what I need with -r
, but I haven’t found an invocation that behaves exactly as I described above. How can daemon
accomplish my task, and if it can’t, what alternative can I use?