Seeking a solid startup script for node.js/forever

Jim Long list at
Fri Mar 18 21:37:36 UTC 2016

On Fri, Mar 18, 2016 at 12:36:03PM -0700, Jim Long wrote:
> How can I modify this script so that it will start cleanly in the
> background?

I guess the obvious, brute force solution is:

--- iws.orig    2016-03-18 14:35:21.206449824 -0700
+++ iws 2016-03-18 14:33:39.770357734 -0700
@@ -31,7 +31,7 @@
-  su -m www -c "exec ${forever} start -a -l ${HOME}/forever.log -o ${HOME}/output.log -e ${HOME}/error.log -p /var/run/forever ${script}"
+  su -m www -c "exec ${forever} start -a -l ${HOME}/forever.log -o ${HOME}/output.log -e ${HOME}/error.log -p /var/run/forever ${script}" &

but if anyone has something more elegant, I'd be grateful to learn of it.


More information about the freebsd-questions mailing list