Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use return code to determine service status in Upstart module.
This also broke the "dead" state. This is because `service` will call `/etc/init.d/<service-name>` for System V style services. Each of which could have different output. For example: $ sudo invoke-rc.d exim4 stop * Stopping MTA [ OK ] $ sudo service exim4 status * checking separate queue runner daemon... [ OK ] * checking combined SMTP listener and queue runner daemon... [ OK ] $ echo $? 3 $ sudo invoke-rc.d exim4 start * Starting MTA [ OK ] $ sudo service exim4 status * checking separate queue runner daemon... [ OK ] * checking combined SMTP listener and queue runner daemon... [ OK ] $ echo $? 0
- Loading branch information
f5cb036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my usage, upstart status is returning true and causing this to think it is running when it isn't.
There needs to be better logic on this, at the very least make sure it is working for upstart as well as System V.
f5cb036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we might need some more serious auditing here, thanks for bringing it up
f5cb036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f5cb036
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This at least restores the default behavior for Upstart jobs. #1161