-
Notifications
You must be signed in to change notification settings - Fork 244
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
rc-status lists service as crashed while rc-service <service> status lists the service as started? #215
Comments
|
It looks to me like you don't need to use start-stop-daemon for this. Try dropping those calls. Also, please use the ${RC_SVCNAME} variable, not ${SVCNAME}. Also, in your status() function, do not call mark_service_* at all. The purpose of the status function is to report status, not change it. |
|
Thanks for the feedback, I will give that a try. |
|
I gave it a try and am having the same problem: Let me know if this is something that should be easily answered by reading the documentation. I am new to openrc scripts, so I any direction is much appreciated. |
|
In your start() and stop() functions, you are trusting that "broctl start" and "broctl stop" return 0 if bro is started or stopped successfully. Please verify that this is true, and if it is not, make the start() and stop() functions return 0 if bro is started or stopped successfully. |
|
rc-status does not call initscripts at all, so your status function is completely ignored. It only shows the state openrc thinks the service should be in, assuming no outside forces (except for crashed, which depends on something like start-stop-daemon to set the appropriate information). rc-service, on the other hand, just calls the initscript, which runs your provided status function. If no status function is provided, the default function matches the behavior of rc-status. |
|
I noticed there is a discrepancy between rc-status and rc-service for a particular service. rc-service lists the service as crashed whereas invoking rc-service status indicates the service is running.
The implementation of rc-status and rc-service must be different.
The service in question is bro and I provided my own init script:
The text was updated successfully, but these errors were encountered: