New unMENU packages for SABnzbd, Sick Beard and Couch Potato


Recommended Posts

MOD EDIT: There are newer packages available for these applications and you can find SABnzb here, SickBeard here, and CouchPotato here.  The SABnzb should work just fine, but the SickBeard and CouchPotato packages might take a little bit of updating to work.  If that is the case PLEASE POST IN THE RESPECTIVE THREAD FOR ASSISTANCE!!

 

I've written unMENU packages to make downloading and installing SABnzbd, Sick Beard and Couch Potato almost as easy as a three click exercise (download, install, enable automatic re-install).

 

Why do I say almost? Because Sick Beard and Couch Potato are hosted on GitHub which only allows downloads over HTTPS, which the unMENU package downloader doesn't understand (yet).

 

The work-around for now is pretty easy, though. Just download those two package archives manually and drop them into your /boot/packages folder together with the package config files, and you'll be good to go.

 

The three packages will download and install all the required dependencies for each app, so you can install any separately, or all together if you like.

 

The packages allow you to configure the installation directory (defaults to /mnt/cache/.<appname>, host (defaults to 0.0.0.0 so you can connect from any machine on your LAN), port (defaults to 8081, 8082 and 8083 to avoid conflicts with unMENU) and also the log dir (defaults to /var/log/<appname> for SABnzbd and Sick Beard, but unfortunately Couch Potato is not configurable).

 

The packages will create start/stop user scripts, so you can start/stop the apps from the unMENU web interface. Or you can use the /etc/rc.d/unraid.d/rc.unraid_<appname> scripts to start/stop the apps from the command line.

 

The install and log dirs are all owned by nobody:users and the apps run as nobody:users, so there should be no problem with file access permissions.

 

If you're just using SABnzbd and Sick Beard, I think your cache drive (or data, if that's where you install it) should be able to spin down. But because logging and download dir scanning cannot be configured in Couch Potato, it will stop your install drive from spinning down.

 

All three apps rotate their logs automatically, so you shouldn't run out of memory by logging to /var/log. But if you want your logs to persist across reboots, feel free to change.

 

I'd like to hear any feedback about these scripts, and if a few people end up using them successfully then Joe L might add them to the official unMENU source (along with HTTPS download support), so that everybody can install these apps with only unMENU installed and a few clicks.

 

I've attached the packages to this post. You can download the required package archives for Couch Potato and Sick Beard from:

 

https://github.com/RuudBurger/CouchPotato/tarball/ccb9f5a7c8fba6583002775b50f632a84318a694

 

and

 

https://github.com/midgetspy/Sick-Beard/tarball/9a8082cb836526564f405be32ff12f7e538307bc

 

Cheers.

 

EDIT: I've updated all three scripts to more reliably detect when the apps are already running (or not), so that they can be started and stopped as required.

 

EDIT 2: Updated pyopenssl to 0.10 for SABnzbd. Added a note that the install port needs to be higher than 1024 (because the apps will run as nobody instead of root).

 

EDIT 3: Updated version string for Couch Potato and Sick Beard to "undefined" so that unMENU doesn't complain about version mis-match after updgrading these apps. Added debugging information to the package install and start/stop scripts. Fixed md5 checksum for pyopenssl-0.10.

 

EDIT 4: Write log line to sabnzbd.ini instead of config.ini.

 

EDIT 5: Update URL to openssl archive in SABnzbd package.

 

EDIT 6: Properly include "set -xv" command in start/stop user scripts.

 

EDIT 7: Update archive URLs to use slakware-13.1 instead of slakware-current, so that they don't disappear on us.

 

EDIT 8: Update SABnzbd package to version 0.6.1.

couchpotato-unmenu-package.conf

sickbeard-unmenu-package.conf

sabnzbd-unmenu-package.conf

Link to comment
  • Replies 221
  • Created
  • Last Reply

Top Posters In This Topic

I'd love to see this get imported into unMENU... and I'm sure I'm not the only one.

As mentioned, once this gets a feedback and its first round of users saying it works (or not, and gets fixed...) I'll add it to the official distribution. 

 

As also mentioned, unMENU has no ability to download from an "https" source.  It uses its own version of "wget" since at the time the package manager was written, "wget" did not exist in the unRAID distribution at all.  It was onle of unMENU's users who contributed the initial basic code that performed the equivalent of "wget" (but written in "awk")

 

I will add the ability to download using the real "wget" but this week has been hectic.  I still have a "transmission" update to evaluate and incorporate into the official google.code site.

 

In the mean-time, just put the three files in your /boot/packages directory and then click on the "https links" to download those packages with your browser. Move them to the \\tower\flash\packages directory.

 

Then, use the unMENU package manager to do the rest.

 

Joe L.

Link to comment

I too would love to see this make it. The way unmenu does things makes it easier for someone like my self who is not code savvy. Guys like me have to wait for someone to write a step by step how to or it gets added to unmenu. However I may give this a shot on Monday when I don't have to work. Thanks for Tyne op for getting this together.

Link to comment

I tried installing Sick Beard and Couch Potato but get the following errors for both "download not necessary, file already exists with correct MD5 checksum."  Where do I proceed from here?  I'm very inexperienced.

 

I installed SABnzbd to disk1, because I don't have a cache drive.  Is this okay?

 

I assume we access the gui via http://tower:8082/ for sabnzbd?  I'm going to read through the topic now.

Link to comment

I tried installing Sick Beard and Couch Potato but get the following errors for both "download not necessary, file already exists with correct MD5 checksum."  Where do I proceed from here?  I'm very inexperienced.

 

I installed SABnzbd to disk1, because I don't have a cache drive.  Is this okay?

 

I assume we access the gui via http://tower:8082/ for sabnzbd?  I'm going to read through the topic now.

I would not recommend installing on disk1. I've had to move mine off the cache to an array drive while I'm swapping around some drives and its awful. Remember, for every little changes its writing to both the data drive and the parity.

 

Also, I would suggest reading the section on installing python based servers in the wiki. It has very clear instructions on manually installing these.

Link to comment

Damn.  The problem is that I don't have a cache drive, and did not have plans on adding one.  

 

I'll go read the wiki now.  

 

EDIT: I read through the wiki, but the point of this is to have unmenu complete the installation.  There isn't much in the wiki that helps my problem.

 

Everything is installed, but I can't access it.  I have a feeling it's user error.

 

Starting via user scripts makes no difference. 

Link to comment

This is great news, couple questions

 

I guess this opens your server to the net to make it less secure of course

Are you able to configure what quality of file you download, for example only 720 or higher.

 

It opens up your unRAID server to your LAN. If you configure your router to forward port 8081-8083 to your unRAID server, then it would be open to the Internet, but only those ports. If you're really worried about security but do want access to these apps from the Internet, you could set up a VPN or SSH tunnel.

 

I only added configuration variables for the port and host so that you could avoid any conflicts with other services that might be running on those ports and to allow you to connect from another machine on your LAN, because most people probably don't have a GUI and web browser running on their unRAID server.

 

The install dir is configurable for people who want to run it from their cache drive or a data drive, or any other drive as they like. And the log is just a sensible default to stop the apps from preventing the install drive from spinning down.

 

Once these apps are installed and accessible, you can configure everything else as you like through the web interface of each app. You can configure both Couch Potato and Sick Beard to download 720p or higher.

 

Cheers.

 

Link to comment

I tried installing Sick Beard and Couch Potato but get the following errors for both "download not necessary, file already exists with correct MD5 checksum."  Where do I proceed from here?  I'm very inexperienced.

 

I installed SABnzbd to disk1, because I don't have a cache drive.  Is this okay?

 

I assume we access the gui via http://tower:8082/ for sabnzbd?  I'm going to read through the topic now.

 

You should be OK to install to disk1, but as others have noted, the performance will take a hit. On the other hand, your data will be better protected, and these applications are for downloading from the Internet which will be much slower than your parity protected hard disk write speeds, anyway.

 

If you click into the SABnzbd package from unMENU, does it say that it is installed?

 

If you view the "user scripts" page in unMENU, does it have a button to "Start SABnzbd" or "Stop SABnzbd"? The start button will only appear if it is not running, and the stop button will only appear if it is running.

 

If it is all installed correctly but you still cannot access http://tower:8082/, open a telnet connection to the unRAID server and type `ps -aux | grep SABnzbd` -- you should see a line that contains "python SABnzbd.py --daemon".

 

If SABnzbd is running, you could try viewing the last few lines of the log file with `tail /var/log/sabnzbd/sabnzbd.log` or the error log with `tail /var/log/sabnzbd/sabnzbd.error.log`.

 

If SABnzbd is NOT running, you could try to start it with the following command, which should print any errors to your terminal window.

 

cd /mnt/cache/.sickbeard

python SABnzbd.py

 

You could also send any screenshots or copy and paste the contents of your telnet session into a PM and I will try to help.

 

Cheers.

 

Link to comment

You should be OK to install to disk1, but as others have noted, the performance will take a hit. On the other hand, your data will be better protected, and these applications are for downloading from the Internet which will be much slower than your parity protected hard disk write speeds, anyway.

Noted, thanks.

 

If you click into the SABnzbd package from unMENU, does it say that it is installed?

Yes, UnMenu says it's installed.

 

If you view the "user scripts" page in unMENU, does it have a button to "Start SABnzbd" or "Stop SABnzbd"? The start button will only appear if it is not running, and the stop button will only appear if it is running.

I have a button that says Start SABnzbd.  Upon clicking, I get an error at the bottom of the page.  "mkdir: cannot create directory `': No such file or directory chown: invalid argument: `' SABnzbd started"

 

I'll wait until we get that error fixed before continuing.  I did not notice it before.

Link to comment

I have a button that says Start SABnzbd.  Upon clicking, I get an error at the bottom of the page.  "mkdir: cannot create directory `': No such file or directory chown: invalid argument: `' SABnzbd started"

 

I'll wait until we get that error fixed before continuing.  I did not notice it before.

 

Can you send me the "SABnzbd-0.5.6-src.tar.gz.manual_install" file from your "packages" folder on your "flash" share?

 

Cheers.

 

Link to comment

I'm using version 4.7, the current release.

Linux 2.6.32.9-unRAID.
root@Tower:~# cd /mnt/disk1/.sabnzbd
root@Tower:/mnt/disk1/.sabnzbd# python SABnzbd.py
2011-02-26 21:27:13,673::INFO::[sABnzbd:973] --------------------------------
2011-02-26 21:27:13,676::INFO::[sABnzbd:974] SABnzbd.py-0.5.6 (rev=2503)
2011-02-26 21:27:13,676::INFO::[sABnzbd:984] Platform = posix
2011-02-26 21:27:13,677::INFO::[sABnzbd:985] Python-version = 2.6.6 (r266:84292,
Nov 27 2010, 19:47:39)
[GCC 4.5.1]
2011-02-26 21:27:13,864::INFO::[misc:308] cache_dir directory: /mnt/disk1/.sabnz
bd/cache does not exist, try to create it
2011-02-26 21:27:13,866::INFO::[__init__:674] /mnt/disk1/.sabnzbd/cache/bookmark
s.sab missing
2011-02-26 21:27:13,867::INFO::[__init__:674] /mnt/disk1/.sabnzbd/cache/rss_data
.sab missing
2011-02-26 21:27:13,869::INFO::[__init__:674] /mnt/disk1/.sabnzbd/cache/bytes9.s
ab missing
2011-02-26 21:27:13,870::INFO::[__init__:674] /mnt/disk1/.sabnzbd/cache/queue9.s
ab missing
2011-02-26 21:27:13,871::INFO::[postproc:139] Loading postproc queue
2011-02-26 21:27:13,872::INFO::[__init__:674] /mnt/disk1/.sabnzbd/cache/postproc
1.sab missing
2011-02-26 21:27:13,875::INFO::[__init__:674] /mnt/disk1/.sabnzbd/cache/watched_
data.sab missing
2011-02-26 21:27:13,877::INFO::[downloader:334] Resuming
2011-02-26 21:27:13,949::INFO::[__init__:251] All processes started
2011-02-26 21:27:13,950::INFO::[sABnzbd:269] Web dir is /mnt/disk1/.sabnzbd/inte
rfaces/smpl
2011-02-26 21:27:14,100::INFO::[sABnzbd:1038] Starting SABnzbd.py-0.5.6
2011-02-26 21:27:14,103::INFO::[dirscanner:375] Dirscanner starting up
2011-02-26 21:27:14,105::INFO::[urlgrabber:103] URLGrabber starting up
2011-02-26 21:27:14,105::INFO::[sABnzbd:390] _yenc module... found!
2011-02-26 21:27:14,107::INFO::[sABnzbd:398] par2 binary... found (/usr/bin/par2
)
2011-02-26 21:27:14,108::INFO::[sABnzbd:406] unrar binary... found (/usr/bin/unr
ar)
2011-02-26 21:27:14,108::INFO::[sABnzbd:411] unzip binary... found (/usr/bin/unz
ip)
2011-02-26 21:27:14,109::INFO::[sABnzbd:417] nice binary... found (/usr/bin/nice
)
2011-02-26 21:27:14,110::INFO::[sABnzbd:421] ionice binary... found (/usr/bin/io
nice)
2011-02-26 21:27:14,110::INFO::[sABnzbd:428] pyOpenSSL... NOT found - try apt-ge
t install python-pyopenssl (SSL is optional)
2011-02-26 21:27:14,113::INFO::[sABnzbd:1136] Starting web-interface on 0.0.0.0:
8082
2011-02-26 21:27:14,115::INFO::[_cplogging:55] [26/Feb/2011:21:27:14] ENGINE Bus
STARTING
2011-02-26 21:27:14,126::INFO::[_cplogging:55] [26/Feb/2011:21:27:14] ENGINE Sta
rted monitor thread '_TimeoutMonitor'.
2011-02-26 21:27:14,233::INFO::[_cplogging:55] [26/Feb/2011:21:27:14] ENGINE Ser
ving on 0.0.0.0:8082
2011-02-26 21:27:14,235::INFO::[_cplogging:55] [26/Feb/2011:21:27:14] ENGINE Bus
STARTED
2011-02-26 21:27:14,236::INFO::[misc:584] Lauching browser with http://localhost
:8082/sabnzbd
2011-02-26 21:27:28,883::INFO::[rss:376] Running scheduled RSS scan

 

Seems like some things are missing  ???

Link to comment

If you view the "user scripts" page in unMENU, does it have a button to "Start SABnzbd" or "Stop SABnzbd"? The start button will only appear if it is not running, and the stop button will only appear if it is running.

 

Do you create a button for each service?

Could you update the wiki with the code to show how you made the buttons hidden when they weren't needed? Even just an example for 1 of the 3 apps would be good to see.

 

Peter

Link to comment

Do you create a button for each service?

Could you update the wiki with the code to show how you made the buttons hidden when they weren't needed? Even just an example for 1 of the 3 apps would be good to see.

 

Peter

 

Yes, there is a button for each app. I did this by using the Transmission package as an example. The relevant parts of the package config file are the `USER_SCRIPT_TEST` lines. These lines use the `test` program to check that the number of lines returned by grepping the process list for SABnzbd.py is less than 1 or greater than 0 to work out if the app is already running or not.

 

Cheers.

 

Link to comment

I'm using version 4.7, the current release.

 

Seems like some things are missing  ???

 

Looks like it is actually running, but as root. I'm not sure if 4.7 handles file permissions differently. It might not need to run as nobody:users under 4.7. Only OpenSSL is missing (from what I can see), and that is optional.

 

Could you try the following commands:

 

chown -R nobody:users /mnt/disk1/.sabnzbd

 

and

 

mkdir -p /var/log/sabnzbd

 

I'm using 5.0 beta 4, but I'll try to set up a virtual machine with 4.7 soon to try and reproduce the problem you are having.

 

Cheers.

 

Link to comment

Done, but I got no output (nothing happened, lol).  I'm very new to linux.

 

And you still get the same errors when trying to stop and start from the user scripts page?

 

How about the output from these commands:

 

ls -la /etc/rc.d
ls -la /etc/rc.d/unraid.d
cat /etc/rc.d/unraid.d/rc.unraid_sabnzbd

 

Link to comment

I just checked, and the error is gone.  But, clicking start does nothing (other than say 'SABnzbd started').  After I click, and head back over to the user scripts page, it has the 'start sabnzbd' button. 

 

root@Tower:~# ls -la /etc/rc.d
total 128
drwxr-xr-x  3 root root     0 Feb 26 12:39 ./
drwxr-xr-x 21 root root     0 Feb 27 11:28 ../
lrwxrwxrwx  1 root root     4 Jan 12 05:16 rc.0 -> rc.6*
-rwxr-xr-x  1 root root  1282 Mar 27  2007 rc.4*
-rwxr-xr-x  1 root root  7358 Jun 13  2007 rc.6*
-rwxr-xr-x  1 root root  2322 May  2  2007 rc.K*
-rwxr-xr-x  1 root root 11325 Jan 12 05:17 rc.M*
-rwxr-xr-x  1 root root 13710 Jan 12 05:17 rc.S*
-rwxr-xr-x  1 root root   466 Nov  5  2004 rc.acpid*
-rwxr-xr-x  1 root root  1893 Sep 25  2009 rc.fuse*
-rwxr-xr-x  1 root root  3060 Jan 12 05:17 rc.ifplugd*
-rwxr-xr-x  1 root root  9258 Jan 12 05:17 rc.inet1*
-rw-r--r--  1 root root  4376 Jan 12 05:17 rc.inet1.conf
-rwxr-xr-x  1 root root  4847 Sep 17  2007 rc.inet2*
-rwxr-xr-x  1 root root   497 Sep 12  2003 rc.inetd*
-rwxr-xr-x  1 root root   541 Jan 12 05:17 rc.local*
-rwxr-xr-x  1 root root  2482 Jan 12 05:17 rc.nfsd*
-rwxr-xr-x  1 root root  1510 Jan 12 05:17 rc.ntpd*
-rwxr-xr-x  1 root root  1402 May 17  2007 rc.rpc*
-rwxr-xr-x  1 root root  4817 Jan 12 05:17 rc.samba*
-rwxr-xr-x  1 root root   989 Jan 12 05:17 rc.syslog*
-rwxr-xr-x  1 root root  1740 Sep 11  1999 rc.sysvinit*
-rwxr-xr-x  1 root root  4808 Jan 12 05:17 rc.udev*
drwxr-xr-x  2 root root     0 Feb 26 13:02 unraid.d/

 

root@Tower:~# ls -la /etc/rc.d/unraid.d
total 16
drwxr-xr-x 2 root root    0 Feb 26 13:02 ./
drwxr-xr-x 3 root root    0 Feb 26 12:39 ../
-rwxr-xr-x 1 root root 1282 Feb 26 13:02 rc.unraid_couchpotato*
-rwxr-xr-x 1 root root 1290 Feb 26 12:39 rc.unraid_sabnzbd*
-rwxr-xr-x 1 root root 1306 Feb 26 13:00 rc.unraid_sickbeard*
-rwxr-xr-x 1 root root  156 Feb 26 12:39 rc.unraid_transmission*

 

root@Tower:~# cat /etc/rc.d/unraid.d/rc.unraid_sabnzbd
case $1 in
  start)
    if test -e /etc/rc.d/unraid.d/rc.unraid_sabnzbd -a $(ps auxwww|grep 'python SABnzbd'|grep -v grep|wc -l) -lt 1; then
      if [ -d "/mnt/disk1/.sabnzbd" ]; then
        cd "/mnt/disk1/.sabnzbd"
        LOG_DIR=$(awk -F ' = ' '$1 == "log_dir" {print $2}' sabnzbd.ini)
        mkdir -p "$LOG_DIR"
        chown -R nobody:users . "$LOG_DIR"
        usermod -s /bin/bash nobody > /dev/null 2>&1
        su nobody -c "python SABnzbd.py --daemon > /dev/null 2>&1"
        echo SABnzbd started.
      else
        echo SABnzbd could not be started because the installation directory, /mnt/disk1/.sabnzbd, could not be found.
        echo If SABnzbd is installed on the unRAID array and the array is stopped, use the buttons on the User Scripts page to start SABnzbd once the array is started.
      fi
    else
      echo SABnzbd is already started.
    fi
  ;;
  stop)
    if test -e /etc/rc.d/unraid.d/rc.unraid_sabnzbd -a $(ps auxwww|grep 'python SABnzbd'|grep -v grep|wc -l) -gt 0; then
      kill $(ps auxwww|grep 'python SABnzbd'|grep -v grep|awk '{ print $2 }')
      sleep 10
      echo SABnzbd stopped.
    else
      echo SABnzbd is already stopped.
    fi
  ;;
  version)
    cd "/mnt/disk1/.sabnzbd"
    python SABnzbd.py --version | grep SABnzbd.py-
  ;;
esac

 

Link to comment

Try running the same commands that the start script runs, but without the redirection to /dev/null (so you can see any errors).

 

cd "/mnt/disk1/.sabnzbd"
LOG_DIR=$(awk -F ' = ' '$1 == "log_dir" {print $2}' sabnzbd.ini)
echo $LOG_DIR
mkdir -p "$LOG_DIR"
chown -R nobody:users . "$LOG_DIR"
usermod -s /bin/bash nobody
su nobody -c "python SABnzbd.py --daemon

 

Link to comment

I got no errors from entering those commands.  It didn't seem to do anything; sabnzbd didn't start (I cannot access it and I still see a Start Sabnzbd button).

 

 

root@Tower:~# cd "/mnt/disk1/.sabnzbd"
root@Tower:/mnt/disk1/.sabnzbd# LOG_DIR=$(awk -F ' = ' '$1 == "log_dir" {print $2}' sabnzbd.ini)
root@Tower:/mnt/disk1/.sabnzbd# echo $LOG_DIR
logs
root@Tower:/mnt/disk1/.sabnzbd# mkdir -p "$LOG_DIR"
root@Tower:/mnt/disk1/.sabnzbd# chown -R nobody:users . "$LOG_DIR"
root@Tower:/mnt/disk1/.sabnzbd# usermod -s /bin/bash nobody
root@Tower:/mnt/disk1/.sabnzbd# su nobody -c "python SABnzbd.py --daemon

Link to comment

I got no errors from entering those commands.  It didn't seem to do anything; sabnzbd didn't start (I cannot access it and I still see a Start Sabnzbd button).

 

If there was no error for the last line, it looks like SABnzbd is running, but maybe the command that detects whether or not it is running is not working. Are you trying to access SABnzbd by its IP address or the name "tower"? e.g. http://tower:8082 or http://XXX.XXX.XXX.XXX:8082? Try both (substituting the XXX's for the IP address of your unRAID server).

 

Also try this from your telnet session:

 

ps ax|grep 'SABnzbd'

 

Link to comment

I've tried by both methods (server name and IP).  Neither work.  Here's the command:

 

root@Tower:/mnt/disk1/.sabnzbd# ps ax|grep 'SABnzbd'
26934 pts/1    S+     0:00 grep SABnzbd

 

btw, if I do

python SABnzbd.py

I am able to access the wizard to set everything up.  Also, the button changes to 'stop sabnzbd' (as it is now running).  I cannot complete setup however, because I get an error: "error importing ssl module".  One step at a time though, lol.

 

I'm on the verge of just upgrading my install to a beta, lol.  Of course, it's beta software, and I rather get it running on a stable build.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.