(OSX) How To Start SickBeard at Login or boot on OSX

General discussion about Sick Beard or related topics

mac osx error using launchctl to start sickbeard on boot

Postby banjomacman » Sun May 22, 2011 3:30 pm

I've gotten my setup almost perfect. Sickbeard is a great piece of software. I'm running sickbeard,couchpotato, and sabnzb on a mac and found the following article that was a great help getting things set to run on boot.

http://christopher-williams.net/2010/09 ... -mac-os-x/

The instructions got sabnzb working perfectly however when I try to use launchctl for sickbeard I get the following from launchctl list command.

- 1 com.sickbeard.daemon

I don’t have any trouble starting sickbeard manually. It seems like I have problem with Cheetah b/c I have the following in my console. Can anyone help? It's like I need to add Cheetah to a path varaible, but I don't know how check or add what path is used when running stuff from launchctl. Any ideas are welcome. Thanks. Mike.

5/21/11 8:42:58 PM com.sickbeard.daemon[18191] Traceback (most recent call last):
5/21/11 8:42:58 PM com.sickbeard.daemon[18191] File “/Users/mikeh/Documents/Sick-Beard/SickBeard.py”, line 41, in
5/21/11 8:42:58 PM com.sickbeard.daemon[18191] from sickbeard.webserveInit import initWebServer
5/21/11 8:42:58 PM com.sickbeard.daemon[18191] File “/Users/mikeh/Documents/Sick-Beard/sickbeard/webserveInit.py”, line 24, in
5/21/11 8:42:58 PM com.sickbeard.daemon[18191] from sickbeard.webserve import WebInterface
5/21/11 8:42:58 PM com.sickbeard.daemon[18191] File “/Users/mikeh/Documents/Sick-Beard/sickbeard/webserve.py”, line 29, in
5/21/11 8:42:58 PM com.sickbeard.daemon[18191] from Cheetah.Template import Template
5/21/11 8:42:58 PM com.sickbeard.daemon[18191] ImportError: No module named Cheetah.Template
5/21/11 8:42:58 PM com.apple.launchd[67] (com.sickbeard.daemon[18191]) Exited with exit code: 1
5/21/11 8:42:58 PM com.apple.launchd[67] (com.sickbeard.daemon) Throttling respawn: Will start in 9 seconds
banjomacman
 
Posts: 5
Joined: Sun May 22, 2011 3:22 pm

Re: mac osx error using launchctl to start sickbeard on boot

Postby rascalli » Sun May 22, 2011 10:55 pm

Isn't this a whole topic about the same : viewtopic.php?f=3&t=87 ???
NL newsserver starting €44,40 a year

Image

Hope you will use my refereal link
rascalli
 
Posts: 4903
Joined: Tue Aug 10, 2010 2:26 pm

Re: mac osx error using launchctl to start sickbeard on boot

Postby banjomacman » Tue May 24, 2011 6:34 pm

I read through all the posts on the link you provided. On the last page someone seems to have had the same

5/24/11 8:28:50 PM com.sickbeard.daemon[45628] ImportError: No module named Cheetah.Template

Error message I'm getting, but the fix was to update sickbeard. I'm already using a newer version than what's mentioned in the post. Do you have any other suggestions or would it be better to re-post on that thread? Thanks. Mike.
banjomacman
 
Posts: 5
Joined: Sun May 22, 2011 3:22 pm

Re: (OSX) How To Start SickBeard at Login or boot on OSX

Postby healthy_beard » Sat Jul 02, 2011 1:25 am

I found yet another method of doing it.

Save the following LaunchAgent plist to
~/Library/LaunchAgents/com.sickbeard.sickbeard.plist

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.sickbeard.sickbeard</string>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/bin/python</string>
    <string>/Users/hbeard/Applications/Sickbeard/SickBeard.py</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>KeepAlive</key>
  <true/>
  <key>UserName</key>
  <string>hbeard</string>
  <key>WorkingDirectory</key>
  <string>/Users/hbeard/Applications/Sickbeard/</string>
  <key>StandardErrorPath</key>
  <string>/Users/hbeard/Applications/Sickbeard/output.log</string>
  <key>StandardOutPath</key>
  <string>/Users/hbeard/Applications/Sickbeard/output.log</string>
</dict>
</plist>



Be sure to change the username from hbeard to whatever your username is. I have sickbeard installed in ~/Applications/SIckbeard but you may have it elsewhere. anyway, change the plist file to have your paths, pythons and what not.

Final step, launch via launchctl with

Code: Select all
launchctl load -w ~/Library/LaunchAgents/com.sickbeard.sickbeard.plist


if you want to stop it from running all the time, you can run the same command but with unload instead of load.

That's all folks.

P.S you'll still need to install the python libs, but I'm not covering the install here. just how to launch at login.

update: I realize this is pretty much the same as chris above. I didn't read his before posting. ANyway, follow instructions of whomever
healthy_beard
 
Posts: 38
Joined: Sat Feb 05, 2011 10:55 pm

Re: (OSX) How To Start SickBeard at Login or boot on OSX

Postby sacksyboy » Fri Aug 19, 2011 12:45 pm

Found a better method from last post in thread (see below).
Last edited by sacksyboy on Fri Aug 19, 2011 1:04 pm, edited 1 time in total.
User avatar
sacksyboy
 
Posts: 6
Joined: Fri Aug 19, 2011 12:42 pm

Re: (OSX) How To Start SickBeard at Login or boot on OSX

Postby sacksyboy » Fri Aug 19, 2011 1:02 pm

This method seems a lot simpler than "healthy_beard"'s previous solution....

Questions:
How do you save the script below as a "LaunchAgent plist"?
How do you "launch via launchctl"?

Thank you.

healthy_beard wrote:I found yet another method of doing it.

Save the following LaunchAgent plist to
~/Library/LaunchAgents/com.sickbeard.sickbeard.plist

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.sickbeard.sickbeard</string>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/bin/python</string>
    <string>/Users/hbeard/Applications/Sickbeard/SickBeard.py</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>KeepAlive</key>
  <true/>
  <key>UserName</key>
  <string>hbeard</string>
  <key>WorkingDirectory</key>
  <string>/Users/hbeard/Applications/Sickbeard/</string>
  <key>StandardErrorPath</key>
  <string>/Users/hbeard/Applications/Sickbeard/output.log</string>
  <key>StandardOutPath</key>
  <string>/Users/hbeard/Applications/Sickbeard/output.log</string>
</dict>
</plist>



Be sure to change the username from hbeard to whatever your username is. I have sickbeard installed in ~/Applications/SIckbeard but you may have it elsewhere. anyway, change the plist file to have your paths, pythons and what not.

Final step, launch via launchctl with

Code: Select all
launchctl load -w ~/Library/LaunchAgents/com.sickbeard.sickbeard.plist


if you want to stop it from running all the time, you can run the same command but with unload instead of load.

That's all folks.

P.S you'll still need to install the python libs, but I'm not covering the install here. just how to launch at login.

update: I realize this is pretty much the same as chris above. I didn't read his before posting. ANyway, follow instructions of whomever
User avatar
sacksyboy
 
Posts: 6
Joined: Fri Aug 19, 2011 12:42 pm

Re: (OSX) How To Start SickBeard at Login or boot on OSX

Postby sacksyboy » Mon Aug 22, 2011 8:08 am

Anyone?
User avatar
sacksyboy
 
Posts: 6
Joined: Fri Aug 19, 2011 12:42 pm

Re: (OSX) How To Start SickBeard at Login or boot on OSX

Postby milomindrbindr » Mon Jan 09, 2012 4:53 pm

After trying all the different methods mentioned, here is the only way that worked and was easiest for me.

I'm running OSX 10.7.2.

Open Automator (Applications -> Automator), choose "Application"

Image


In the far left column, choose "Utilities" and then click "Run Shell Script" and drag it into the workspace area on the right. It should look like this after you drag Run Shell Script in to the workspace
Image

My Sick-Beard install is in my user folder. Some people prefer it in their Applications
If installed in your user folder copy and paste this text:
Code: Select all
python /Users/YourUSERNAME/Sick-Beard/SickBeard.py -d

If installed in your applications folder, paste this text:
Code: Select all
python /Applications/Sick-Beard/SickBeard.py -d


Choose "as arguments" in the "Pass input" drop down on the right.

It should look like this:

Image



Then go to File -> Save and name it and place the application wherever you want. I prefer the applications folder.

Now go to System Preferences -> Users & Groups, click your username in the left column, then choose "Login Items" and hit the "+" button at the bottom of the window and add the application you just saved from Automator to your Login Items.

That's it!
milomindrbindr
 
Posts: 4
Joined: Mon Jan 09, 2012 4:30 pm

Re: (OSX) How To Start SickBeard at Login or boot on OSX

Postby robertsm » Sat Jan 14, 2012 11:10 pm

mrchip wrote:Here's a sample plist file for SickBeard, com.sickbeard.sickbeard.plist. My copy of SickBeard is in /usr/local/SickBeard, so you'll need to edit this to match the path to your own SickBeard.py.
Edited 26-Mar-2011, added -d flag, SickBeard will now update when updates are initiated via the web interface.
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.sickbeard.sickbeard</string>
  <key>ProgramArguments</key>
  <array>
       <string>/usr/bin/python</string>
       <string>/usr/local/SickBeard/Sick-Beard/SickBeard.py</string>
       <string>-q</string>
       <string>-d</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
</dict>
</plist>


Try as I might I could not get this to work on Lion (10.7.2). Then I changed the location to python as follows and now everything starts up like it's supposed to.
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.sickbeard.sickbeard</string>
  <key>ProgramArguments</key>
  <array>
       <string>/Library/Frameworks/Python.framework/Versions/2.7/bin/python</string>
       <string>/usr/local/SickBeard/Sick-Beard/SickBeard.py</string>
       <string>-q</string>
       <string>-d</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
</dict>
</plist>
robertsm
 
Posts: 1
Joined: Sat Jan 14, 2012 10:54 pm

Re: (OSX) How To Start SickBeard at Login or boot on OSX

Postby plain » Wed Apr 04, 2012 1:48 pm

i've tried this 10 different ways. script i'm attempting to use in the automater shell script works in terminal but it is not working when i package the app. any thoughts?

milomindrbindr wrote:After trying all the different methods mentioned, here is the only way that worked and was easiest for me.

I'm running OSX 10.7.2.

Open Automator (Applications -> Automator), choose "Application"

In the far left column, choose "Utilities" and then click "Run Shell Script" and drag it into the workspace area on the right. It should look like this after you drag Run Shell Script in to the workspace

My Sick-Beard install is in my user folder. Some people prefer it in their Applications
If installed in your user folder copy and paste this text:
Code: Select all
python /Users/YourUSERNAME/Sick-Beard/SickBeard.py -d

If installed in your applications folder, paste this text:
Code: Select all
python /Applications/Sick-Beard/SickBeard.py -d


Choose "as arguments" in the "Pass input" drop down on the right.

It should look like this:

Then go to File -> Save and name it and place the application wherever you want. I prefer the applications folder.

Now go to System Preferences -> Users & Groups, click your username in the left column, then choose "Login Items" and hit the "+" button at the bottom of the window and add the application you just saved from Automator to your Login Items.

That's it!
plain
 
Posts: 1
Joined: Wed Apr 04, 2012 11:53 am

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 7 guests