How does one check whether the OS X "disabled" flag for launchd services is set?
Posted
by
Charles Duffy
on Server Fault
See other posts from Server Fault
or by Charles Duffy
Published on 2011-01-04T02:48:52Z
Indexed on
2011/01/04
2:55 UTC
Read the original article
Hit count: 288
According to the man page for launchctl
(emphasis mine):
-w Overrides the Disabled key and sets it to false. In previous versions, this option would modify the configuration file. Now the state of the Disabled key is stored elsewhere on-disk.
Because the current state of the disabled flag is no longer set in the .plist
file itself, checking for the Disabled
key is no longer an accurate way to tell if the service will run on next boot.
Where is this "elsewhere on-disk"? More to the point (and more importantly), how does one check whether this flag is set?
Also, is it possible to set a service to run on next boot without forcing it to start immediately (as with launchctl load -w /Library/LaunchDaemons/my-service.plist
)?
© Server Fault or respective owner