Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SABnzbd+ SickBeard CouchPotato Plugin/Installer for v5b11+

Featured Replies

First, many thanks to those who've created these plugins!

 

I've been playing with them a bit, and finding some problems and partial answers...

 

First, doing a right-click and Save As in Firefox ended up saving them as xyz.plg.txt - need to remove the .txt extension.

(I think that's been mentioned,  but for anyone that misses it, I'm noting it again -- this whole thread got rather long and difficult to read...)

 

 

I've gotten lots of hangs - they might have come back if I'd waited long enough, but I didn't test that.

 

I've caused hangs by:

- giving an invalid data directory  (e.g., /disk1/apps/sickbeard instead of /mnt/disk1/apps/sickbeard)

- giving an invalid port  (e.g., 8080 which was already in use by unMenu)

 

These seem to be caused by the rc.xyz script hanging, waiting for the app to start or stop.

 

The plugin scripts use the process ID in /var/run/ to determine if the app is running. (e.g., /var/run/sickbeard/sickbeard.pid)  This is unreliable for various reasons:

- I've seen 'pid' in it insread of the expected process ID - I'm not sure of when that happened or what caused it.

- SABnzbd sometimes creates sabnzbd-9090.pid instead of the expected sabnzbd-8081.pid.  Presumably that's because I enabled HTTPS which uses 9090.

 

I think it'll be better to parse the ps -A -f results.  I'll take a stab at that to see what I can come up with.

 

In the meantime, use a command terminal, telnet into unRAID, and use ps -A to see the process ID for the rc.xyz script, and kill it.  That almost always brings things back immediately.

 

 

The scripts have lines like:

if [ $RUNAS != $1]; then

This is line 78 in /etc/rc.d/rc.sickbeard; I forget what it was in SABnzbd. 

 

This causes a  "missing ']'" error message.

 

They need a space between the $1 and the ]

 

 

The rc.xyz scripts go into a wait loop, waiting for the app to start or stop.  This is from rc.sabnzbd:

sabnzbd_stop() {
  # no-op if not running
  if [ ! -r /var/run/sabnzbd/sabnzbd-$PORT.pid ]; then
    return
  fi

  echo -n "Stopping sabnzbd..."
  sleep 0.5
  echo

  if [ -d $DATADIR ] && [ -f $DATADIR/sabnzbd.ini ]
        then
                APIKEY=`grep -w api_key $DATADIR/sabnzbd.ini | cut -d " " -f3`
                IP=$(ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | grep -v '^5' | awk '{ print $1}')
                RES=$(wget -qO - "http://$IP:$PORT/sabnzbd/api?mode=shutdown&apikey=$APIKEY")
                                if [[ $RES != "ok" ]]
                                then
                                        echo "wrong API KEY found, using kill"
                                        kill $(cat /var/run/sabnzbd/sabnzbd-$PORT.pid)
                                fi
        else
                kill $(cat /var/run/sabnzbd/sabnzbd-$PORT.pid)
  fi

  echo

  while [ -e /var/run/sabnzbd/sabnzbd-$PORT.pid  ]; do
        sleep 1
  done

}

 

The sleep loop never exits if there was any problem.  As noted above, I saw sabnzbd-9090.pid instead of sabnzbd-8081.pid; in this case, the file is never deleted so the sleep loop never exits.

 

If it goes through either path where it uses kill, the file may not be erased even when it's the correct pid; again, the sleep loop never exits.

 

There should be a failsafe in the loop - exit after 10 seconds or so, regardless of the xyz.pid file status.

 

 

 

 

 

  • Replies 1.2k
  • Views 252.7k
  • Created
  • Last Reply

I've attached a file which is a bash script (as a function) to get the PID of processes.  It is similar to pidof, but will also get the PID of scripts.

 

It includes several tests which also demonstrate its use.

 

I haven't tested it in any of the plugins yet.

 

(I had to name it 'isrunning.txt' so I could upload it - just remove the .txt extension.)

isrunning.txt

For most all of my unMenu packages I do a ps -ef |grep APP_NAME_HERE and from there grab the pid and kill it.  Seems to work for me 99% of the time.

any hope for plugin Headphones ??

Getting the following errors in my syslog that are stopping the sabnzbd plugin from loading any ideas?  any help would be greatly appreciated....

 

Jan  6 19:27:39 Tower logger: installing plugin: sabnzbd-0.4c-i468-bw

Jan  6 19:27:39 Tower logger:

Jan  6 19:27:39 Tower logger: Warning: simplexml_load_file(): /boot/config/plugins/sabnzbd-0.4c-i468-bw.plg:1: parser error : Start tag expected, '<' not found in /usr/local/sbin/installplg on line 13 (Errors)

Jan  6 19:27:39 Tower logger: Jan  6 19:27:39 Tower logger: Warning: simplexml_load_file(): /<?xml version='1.0' standalone='yes'?> in /usr/local/sbin/installplg on line 13 (Minor Issues)

Jan  6 19:27:39 Tower logger: Jan  6 19:27:39 Tower logger: Warning: simplexml_load_file(): ^ in /usr/local/sbin/installplg on line 13 (Minor Issues)

Jan  6 19:27:39 Tower logger:  xml parse error (Errors)

Jan  6 19:27:39 Tower emhttp: unRAID System Management Utility version 5.0-beta14 (Lime Tech)

 

Update:  Diregard.  Copied across a clean version of the .plg file and made changes again and worked fine.

I scanned most of the thread and I cannot see an answer to my question.

Currently have Sickbeard and SABNZBD installed but when I am trying to link them Sickbeard cannot connect to Sabnzd. I have tried:

127.0.0.1

192.168.178.2

localhost

 

Everytime I start SABNZBD it changes the listen address to 0.0.0.0 which I think is the problem but if I change the config file it doesn't stick?

Everytime I start SABNZBD it changes the listen address to 0.0.0.0 which I think is the problem but if I change the config file it doesn't stick?

 

You can keep the listen address as 0.0.0.0 - I believe that tells SABnzbd to listen on all network interfaces.  That's what mine is set to.

 

What do you use for SABnzbd port?  (I'm using 8081)

 

Seems to me that if you change the configuration and it doesn't stick, then something is wrong.

 

Try changing something to confirm it doesn't stick.  I just verified changes survive rebooting.  I changed the skin to "classic red" (*ugly*!), saved it and restarted SABnzbd  (both with the buttons on the bottom of the SABnzbd config page).  It restarted in the classic red skin.    I then shut down and rebooted the system and it stayed with the classic red skin.

 

Just to confirm - you are able to get to SABnzbd and Sickbeard ok, but just can't get them working together.  Is that correct? 

 

Everytime I start SABNZBD it changes the listen address to 0.0.0.0 which I think is the problem but if I change the config file it doesn't stick?

 

You can keep the listen address as 0.0.0.0 - I believe that tells SABnzbd to listen on all network interfaces.  That's what mine is set to.

 

What do you use for SABnzbd port?  (I'm using 8081)

 

Seems to me that if you change the configuration and it doesn't stick, then something is wrong.

 

Try changing something to confirm it doesn't stick.  I just verified changes survive rebooting.  I changed the skin to "classic red" (*ugly*!), saved it and restarted SABnzbd  (both with the buttons on the bottom of the SABnzbd config page).  It restarted in the classic red skin.    I then shut down and rebooted the system and it stayed with the classic red skin.

 

Just to confirm - you are able to get to SABnzbd and Sickbeard ok, but just can't get them working together.  Is that correct?

 

Thanks mate but I got it working. I had to reboot for another reason and ended up giving it another try and it worked first time on 127.0.0.1, thank you anyway! :)

 

If in doubt reboot?

 

EDIT:

Does anyone know how to force Sickbeard to run through and rename all current (before Sickbeard) content?

Nevermind found it.

Ok, last part. The sabtosickbeard.py does not seem to be working and I feel it has to do with the config file. The reason I say this is because SAB is picking up on the script file and seems to try and run it each time it finishes a file but Sickbeard seems to ignore and a manual post processing needs to be done.

 

[sickBeard]

host=127.0.0.1

port=8081

username=

password=

web_root=/sickbeard

 

What I can see above is right, Sickbeard has no username/password.

Change port to 8082

 

Sent from my Nexus S using Tapatalk

Change port to 8082

 

Sent from my Nexus S using Tapatalk

 

Thanks mate, I will give that a try but my sickbeard is running on 8081.

Sabnzbd

8080

Sickbeard

8081

Couch Potato

8082

 

??

Ok, last part. The sabtosickbeard.py does not seem to be working and I feel it has to do with the config file. The reason I say this is because SAB is picking up on the script file and seems to try and run it each time it finishes a file but Sickbeard seems to ignore and a manual post processing needs to be done.

 

[sickBeard]

host=127.0.0.1

port=8081

username=

password=

web_root=/sickbeard

 

What I can see above is right, Sickbeard has no username/password.

This is what I have

[sickBeard]

host=localhost

port=8081

username=

password=

web_root=

 

Have you checked the sabnzbd forums?

In order to use sickbeard's postprocessing, you must download your episodes in a temporary directory.

Setup a different category for sickbeard's downloads, using a different folder.

Only then will the postprocess script rename and move the files to the show directory.

Ok, last part. The sabtosickbeard.py does not seem to be working and I feel it has to do with the config file. The reason I say this is because SAB is picking up on the script file and seems to try and run it each time it finishes a file but Sickbeard seems to ignore and a manual post processing needs to be done.

 

[sickBeard]

host=127.0.0.1

port=8081

username=

password=

web_root=/sickbeard

 

What I can see above is right, Sickbeard has no username/password.

This is what I have

[sickBeard]

host=localhost

port=8081

username=

password=

web_root=

 

Have you checked the sabnzbd forums?

In order to use sickbeard's postprocessing, you must download your episodes in a temporary directory.

Setup a different category for sickbeard's downloads, using a different folder.

Only then will the postprocess script rename and move the files to the show directory.

 

Thanks mate.

 

I will give this a try, you didn't by any chance need to modify sabToSickBeard.py to cover a different python location on unRaid?

Thanks mate.

 

I will give this a try, you didn't by any chance need to modify sabToSickBeard.py to cover a different python location on unRaid?

I don't remember changing sabToSickBeard.py and i'm not at the server now.

I do remember having  to move/change the autoProcessTV.cfg and make sure sab sorting is turned off.

check this link for more info: http://code.google.com/p/sickbeard/wiki/PostProcessing

Thanks mate.

 

I will give this a try, you didn't by any chance need to modify sabToSickBeard.py to cover a different python location on unRaid?

I don't remember changing sabToSickBeard.py and i'm not at the server now.

I do remember having  to move/change the autoProcessTV.cfg and make sure sab sorting is turned off.

check this link for more info: http://code.google.com/p/sickbeard/wiki/PostProcessing

 

Forgive me for being so stupid but where is that option? I tried changing the processing on the actual Sickbeard category but that didn't seem to do it (options relating to unpack etc.)

 

The only option I can see that seems to relate to sorting (I have googled, everyone just says turn off sorting but not where the actual option is) is:

Post-Process Only Verified Jobs

 

^ I am not sure if that will do it and I don't really want to disable it should it have an effect on other downloads. I will keep googling and I have obviously missed something but for the life of me I cannot find it. :(

 

EDIT:

Just found the sort option under Config, how the hell did I miss that earlier?

Long story short though none of the enable sorting options are ticked. I have never touched this before so it must be default.

 

 

You may want to double check all the config pages in sab and sb. Do you have categories setup correctly in sab? Double check the autoProcessTV.cfg file (this is what I got stuck on originally)

Here's a few more sites that should help you:

http://www.lockstockmods.net/2010/06/03/unraid-with-sabnzbd-and-sickbeard/

http://stephenkjones.com/2011/09/23/sabnzbd/

 

I won't be at my server for a few more hours, still at work but I will try to help you get it right.

You may want to double check all the config pages in sab and sb. Do you have categories setup correctly in sab? Double check the autoProcessTV.cfg file (this is what I got stuck on originally)

Here's a few more sites that should help you:

http://www.lockstockmods.net/2010/06/03/unraid-with-sabnzbd-and-sickbeard/

http://stephenkjones.com/2011/09/23/sabnzbd/

 

I won't be at my server for a few more hours, still at work but I will try to help you get it right.

 

I think it is screenshot time. :)

http://db.tt/rSZmuulb

 

Appreciate the help though, so very stuck with this one.

The first screenshot, under category should be tv not sickbeard

The first screenshot, under category should be tv not sickbeard

 

In Sickbeard the category for downloads to go into is 'sickbeard' but I will try this.

Ok in the first screenshot, I think you need to change the category to tv and change the folder/path to TV (or whatever your share is named)

 

 

Ok in the first screenshot, I think you need to change the category to tv and change the folder/path to TV (or whatever your share is named)

 

I feel that is already working correctly.

Downloads go into:

*/Downloads/sickbeard

 

Everything is in lower case to try and ensure no directory matching issues. There is no where in Sickbeard that I can see that defines where to pick up shows from (unless SAB link is not setup)

 

I feel I have it 95% done, Sickbeard will place the download in SAB correctly with the correct category and the download arrives in the correct folder. Sickbeard just won't for whatever reason process it from there, a manual process of directory works though.

 

EDIT:

Going to run a reboot, will adjust and let you know.

Here's a couple of screenshots from my setup

 

http://db.tt/qk5XFdWd

http://db.tt/VPzBcAlx

do you have an entry for Post-Processing Scripts Folder? It needs to point to the location of sickbeard/autoProcessTV

Here's a couple of screenshots from my setup

 

http://db.tt/qk5XFdWd

http://db.tt/VPzBcAlx

do you have an entry for Post-Processing Scripts Folder? It needs to point to the location of sickbeard/autoProcessTV

 

Thanks mate but I have given up. I setup the post processing section on Sickbeard to just pickup from /Downloads/sickbeard and its working without fault.

 

I disabled the script so there should not be conflicts even though it didn't work anyway, this thing seems to pickup downloads nearly as soon as they have happened? Personally I don't see why anyone would want to use the sabtosickbeard script because this just works and requires less configuration.

 

My guess is that the Sickbeard post processing part was never this good and that script is the old way things use to get done. I am happy though because now Sickbeard just covers the entire process. :)

Regardless of the outcome I would like to take this opportunity to thank you for your time, I have found the unRaid community very helpful during my time here.

Thank you very much for these plugins. I got SB and SABnzbd+ setup and running off my cache drive. As such my cache drive is always spun up and my server will not go to sleep using one of the s3.sh scripts. Is there a way to still allow the server to sleep if SAB and SB are not doing anything? Would I need to install these to run from RAM and use the cache drive as the data drive or will that also keep the cache drive spinning?

Question: per the default install, is /usr/local/ on the USB drive?  Or is that on my Cache drive?  Thanks!

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.