What's wrong with my launchctl config?
Solution 1:
I'm assuming the paths to the python script and its parameters are valid, otherwise you'd most likely be seeing errors in the Console instead.
The last time I saw that error was because there were spurious characters in the plist, e.g. extra spaces, causing syntax errors and therefore making it fail to load. If you run plutil -lint
on your plist, this will check the syntax for you and also handily report back the line on which the error occurred.
plutil -lint com.sickbeard.sickbeard.plist
If that doesn't help, the (OSX) How To Start SickBeard at Login or boot on OSX thread on the sickbeard forums has a slightly different plist to yours (sickbeard running from /usr/local
as opposed to /Applications
- so it could be a permissions thing) and also some people with seemingly the same problem as you
Solution 2:
As I discovered the hard way, you must execute the command using sudo
as well as passing the full path of the .plist
file as follows (in your case):
sudo launchctl load /Library/LaunchDaemons/com.sickbeard.sickbeard.plist
The path may be different for you, but you must locate the file to find out its location and pass it as I quoted to the launchctl
command.
Solution 3:
The message nothing found to load
means sometimes that the config is overriden by an other config. You force the loading by using the option "-w" when using launchctl load or unload
.
If you have to force the load or unload of a plist file, it means that you have a config which overrides the plist. This overriding is created when you use the "-w" otherwise no override will be added to the overrides file. To prevent this case, edit the file below, search the job label that you want to remove the override, delete the necessary lines:
pico /var/db/launchd.db/com.apple.launchd/overrides.plist
For example, delete this line
<key>com.mydomain.myjob</key>
<dict>
<key>Disabled</key>
<true/>
</dict>
then you could use: launchctl load or unload /Library/LaunchDaemons/com.mydomain.myjob.plist
without the need of "-w" or "-F", you should not have the message nothing found to load
Solution 4:
You might want to add the -F flag to force launchctl
to load the .plist. Also, make sure that the .plist is in the paths launchctl
searches. If your .plist is somewhere else, you may also add the -D flag and specify the domain. From the manpage:
-D domain
Look for plist(5) files ending in *.plist in the domain given. Valid domains include "system," "local," "network" and "all." When providing a session type, an additional domain is available for use called "user." For example, without a session type given, "-D system" would load from property list files from /System/Library/LaunchDaemons. With a session type passed, it would load from /System/Library/LaunchAgents.
Make sure that you thoroughly review all information contained in the manpage - you can really wreck things if your call is not properly configured.