Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OSX sabnzbd daemon using launchctl with a wait for the volume to be present (using MountWatcher)
?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.sabnzbd.SABnzbd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/open</string>
<string>-a</string>
<string>/Applications/SABnzbd.app</string>
</array>
<key>KeepAlive</key>
<dict>
<key>PathState</key>
<dict>
<key>/Volumes/downloads</key>
<true/>
</dict>
</dict>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
# create the plist file (insert the text from the other file)
vi ~/Library/LaunchAgents/com.sabnzbd.SABnzbd.plist
# BE SURE to change the /Volumes location to match yours!
# load it (be sure to have sab shut down before running this)
launchctl load ~/Library/LaunchAgents/com.sabnzbd.SABnzbd.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.