Run SABnbd+ at startup (OSX)

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
s3ood
Newbie
Newbie
Posts: 6
Joined: April 16th, 2008, 7:06 pm

Run SABnbd+ at startup (OSX)

Post by s3ood »

1. Create a plist using any program you like using the following code:
Note: make sure its plain text if your using TextEdit

Code: Select all

<?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.random.sabnzbd</string>
	<key>ProgramArguments</key>
	<array>
		<string>/Volumes/Files/SABnzbd/SABnzbd.py</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>
Another note: make sure you change

Code: Select all

<string>/Volumes/Files/SABnzbd/SABnzbd.py</string>
to the location of your SABnbd.py

2. Save it as com.random.sabnzbd.plist to your desktop or where ever.
Note: Make sure there is no hidden .txt or any other ext when you save with TextEdit.

3. Open Terminal type:

Code: Select all

cp ~/Desktop/com.random.sabnzbd.plist ~/Library/LaunchAgents/
4. Restart/log off or just type the following command to start SABnbd+

Code: Select all

launchctl load -w ~/Library/LaunchAgents/com.random.sabnzbd.plist 
no more annoying terminal icon :D
Last edited by s3ood on April 16th, 2008, 7:21 pm, edited 1 time in total.
bpwats
Newbie
Newbie
Posts: 28
Joined: May 16th, 2008, 10:13 am

Re: Run SABnbd+ at startup (OSX)

Post by bpwats »

Interesting way for automatic restart function:

Code: Select all

<?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>KeepAlive</key>
	<dict>
		<key>SuccessfulExit</key>
		<true/>
	</dict>
	<key>Label</key>
	<string>org.teamsabnzbd.sabnzbd</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/local/SABnzbd/SABnzbd.py</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>
created using Property List Editor (part of developer tools)

The KeepAlive key restarts the program on clean exit. (Setting SuccessfulExit to false would restart it after crashing.) So either way, it needs RunAtLoad set to true.

Do not use

Code: Select all

<key>KeepAlive</key>
	<true/>
as in my experience it tries to start SABnzbd on system hold up => locking up your machine.

Bryan Wats
Running from sources on Mac OS X 10.5, DevTools 3.1
Post Reply