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

adding loaded feature to mac_service #46206

merged 3 commits into from Mar 7, 2018


Copy link

@weswhet weswhet commented Feb 26, 2018

What does this PR do?

Adds the ability for the mac_service module to recognize whether or not a mac service should have an active PID when checking the status, as some macOS services run on intervals or are initiated by other manners. This improves the support for the service state which previously would only work properly for services that are set be always running with an active PID.

What issues does this PR fix or reference?


Previous Behavior

service.status on macOS would return an empty string for any service that did not have an active PID. Which would send a false positive of sorts to the service state module.

New Behavior

Salt will now check the macOS service to see whether or not the service should actively be running by checking the KeepAlive key in service plist. If the service is not meant to be always running but the service is properly loaded in launchd service.status will now return a string 'loaded'.

CC @gtmanfred as we briefly talked about this addition.

Tests written?


Commits signed with GPG?


Copy link

Welcome @weswhet! Thank you for this change.

Looks like there is a lint error on this:

Can you fix that up?

Copy link
Contributor Author

weswhet commented Feb 28, 2018

Thanks for the warm welcome @rallytime, lint check is passing now. Let me know if I need to do anything else. 😄

:rtype: bool

.. versionadded::
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, this line should be .. versionadded:: Fluorine

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, looks like you beat me to it. Thanks

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

Successfully merging this pull request may close these issues.

None yet

3 participants