问题
I'm trying to use the -p
option to define where pid files are kept when starting forever with sudo. However, the pid files always show up in /home/user/.forever
instead of /var/run/forever
edit: fyi I've switched to nodemon in dev and pm2 in production.
回答1:
My workaround was using the environment variable since -p didn't work for me either in my init.d script.
export FOREVER_ROOT=/var/run/forever
Hope this help you a bit until they release a version with a fix.
Was kinda mind puzzling since I tried to run forever with a forever system user without a home directory.
来源:https://stackoverflow.com/questions/21393040/forever-p-var-run-forever-is-ignored