zapty / forever-service

Provision node script as a service via forever, allowing it to automatically start on boot, working across various Linux distros and OS
https://github.com/zapty/forever-service
MIT License
594 stars 65 forks source link

Need to define /usr/bin/node #43

Open markolbert opened 8 years ago

markolbert commented 8 years ago

Great piece of software! I ran into one problem on the Raspberry Pi where the script service wouldn't start on reboot because the init routines apparently look to the node executable being at /usr/bin/node and, at least on my system, they were installed at /usr/local/bin/node. The fix was just to create a symlink at /usr/bin/node pointing at /usr/local/bin/node. Voila! Everything worked as expected.

MarkNBroadhead commented 8 years ago

I need to do this as I have multiple node binaries on my system. Forever allows specifying the node binary with the "-c" switch. There does not appear to be anything comparable in this library yet?

arvind-agarwal commented 8 years ago

@MarkNBroadhead please take a look at #40

While you will need to have some global node process for running forever, and forever-service, the actual script may be be run by an alternate nodejs version since that is what forever will invoke via "-c" switch.

So you could still use -c switch for you script and have a global nodejs instance which will be only used to co-ordinate forever process in the service file.