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

Monitor a background non node js application #162

Open
NkV7 opened this issue Sep 20, 2018 · 1 comment
Open

Monitor a background non node js application #162

NkV7 opened this issue Sep 20, 2018 · 1 comment

Comments

@NkV7
Copy link

NkV7 commented Sep 20, 2018

Monitoring a background C++ application that is started by a bash script. The following is saved as test.js

var forever = require('forever-monitor');
process.stdin.resume();

var child = forever.start([ '/bin/bash', '-c', '/bin/myshellscript start' ], {
max: 5,
silent: true
});

forever start test.js works fine and spawns up child processes started from shell script. Also works when we crash or pskill the script.

forever stop test.js does not provide a way like stop events to kill the child process. Any sample scripts would be great.

Thanks

@NkV7
Copy link
Author

NkV7 commented Sep 20, 2018

In addition I have also tried the following method.
sudo forever start -c /bin/bash mybash.sh start
Again, the start process works like magic, but the stop process is two step
sudo forever list
sudo forever stop pid

My question is with both command line and forever-monitor API, is there a better way to stop the process and child process.

sudo forever stop -c /bin/bash mybash.sh stop

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

1 participant