Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: What's the recommended way to use forever with init.d to keep npsystat running #1

Open
ghazlewood opened this issue Apr 2, 2013 · 2 comments
Assignees

Comments

@ghazlewood
Copy link

I'm running a couple of servers on Centos 6 and have got npsystat setup (great work, thank you!) but don't have it set to run on reboot and was wondering what the best method was for running it with forever on a system like this. I'm not particularly familiar with node or forever to know the best way. Obviously I can just create an entry manually but was hoping you had a sensible suggestion for the right way :)

@ghost ghost assigned dcaylor Apr 3, 2013
@dcaylor
Copy link
Collaborator

dcaylor commented Apr 3, 2013

I don't have a cleanly pre-baked solution for this. The setup I use is not generalized.

Forever will reliably keep npsystat running as long as the server stays up. Forever also has restart and stop commands. So it should be fairly easy to do a very simple init.d script to invoke this at boot.

The start command is in the README.
The stop command is very similar, something like
forever stop /opt/npsystats/index.js
And restart is the same
forever restart /opt/npsystats/index.js
obviously /opt/npsystats/index.js would be wherever you put npsystats.

Sorry, that's not the complete "right" answer. If I do get a init.d script I'll include it.

@ghazlewood
Copy link
Author

Thanks David, I was pretty sure that if there was an existing init.d script I would have seen it in your docs already. :)

I'll do some homework on it and see if I can find a mashup which works well...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants