Open ryanjarvis opened 8 years ago
I stand corrected. /usr/local/bin was not in root's PATH. I only thought it was because I had set the paths available for sudoers earlier using sudo visudo
.
Since /usr/local/bin is not part of the path for a default Amazon Linux image, the workaround was to set an environment variable when calling forever-service install -e "PATH=/usr/local/bin:$PATH"
this worked with Amazon AMI.
Thanks a lot.
Awesome, this solved it for me under latest Amazon AMI.
still not working forme I'm using nvm I trying this:
sudo "$(which forever-service)" install validex-cron -f " --watchDirectory ./src -w -o out.log -e err.log -c /home/ubuntu/.nvm/versions/node/v14.16.1/bin/node " -e "PATH=/home/ubuntu/.nvm/versions/node/v14.16.1/bin:$PATH" --script ./src/index.js
but not working
this can install the service but can't run the process =,(
sudo env "PATH=$PATH" forever-service install validex-cron -f " --watchDirectory ./src -w -o out.log -e err.log -c /home/ubuntu/.nvm/versions/node/v14.16.1/bin/node" --script ./src/index.js
Amazon Linux AMI release 2015.09
returns saying the service was provisioned successfully but then I get
node is installed at /usr/local/bin And /usr/local/bin appears to be on the $PATH for both the user, sudoers and root.
Also just calling
forever server.js
appears to workAny ideas?