DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2011-12-08 05:05:57

Terrabyte
Member
Registered: 2011-08-19
Posts: 96

Sabnzbd, Sickbeard & CouchPotato on DNS-320

******** UPDATED FEBRUARY 2012 ********

Let me start by saying I am not an Linux expert. I pieced most of this together by googling.

I like to thank all the developers of Debian, SABnzbd, Sickbeard, CouchPotato and Headphone. Without you this would be a pipe dream. I would also like to thank: uli, morgothtdo, danfozzy, cissoubaka, i814u2, mmoedt. Without their help you wouldn't be reading this guide.

I take no responsibly for damaging your NAS, Car, House, Spouse or anything else that can happen.

@@@ YOU MUST HAVE FUN_PLUG INSTALLED AND RUNNING ON THE NAS @@@
You have been WARNED. Let me say it again. You have been WARNED

**** Command Line Syntax ****
To make the command line syntax easier to understand
#=root user state       (#chmod 755 /etc/init.d/sabnzbd)
$=regular user state   ($cd /home/newuser)

*** In the Beginning ***
Debian download file for DNS-320

ftp://ftp.dlink.pl/dns/dns-320/driver_s … 110111.zip

Create a backup of the fun_plug script file that is on the DNS-320
Rename the backup to "fun_plug.bak" and keep it in the same location
This backup is very important so please verify that it was backup

Install prebuilded Debian Squeeze.

From the archive you have already downloaded
(DNS-320&325_linuxDebian_revA_Squeeze_all_en_20110111.zip)
unpack two files:
fun_plug.debian
squeeze.tar.gz
Rename fun_plug.debian to fun_plug
and put them to \\DNS-device\Volume_1 it should be replace the old fun_plug file that you backed up

SSH to the device.
You should get the ffp prompt: /#
Perform the following commands:
# cd /mnt/HD/HD_a2
# gunzip squeeze.tar.gz
# tar -xf squeeze.tar
# ls

Confirm that a directory called "squeeze" has been created and that the new fun_plug is there.

Then shutdown and reboot the device via its WebUI interface.

Now you should have a working Debian Squeeze distribution that can be chrooted during bootup.
After the device is up again, there should be a possibility to connect to the Debian Squeeze installation using SSH.

SSH into your NAS - Login as "root". The default password for this build is "dlink".

ssh root@your.nas.ip

Add updated repos
#nano /etc/apt/sources.list  **Add lines below to file**
   

Code:

deb http://security.debian.org/ squeeze/updates main contrib non-free

--- Hit Control o to write file than Control x to exit file ---

#apt-get update
#apt-get upgrade
#passwd

adduser newuser     (newuser = name of new account you will be adding to Debian. So change it to what you want it to be)

Set Time Zone
#dpkg-reconfigure tzdata
#cat /etc/timezone

Set locale settings as follows
#apt-get install locales
#locale-gen en_US en_US.UTF-8
#dpkg-reconfigure locales

Installation of Git and dependency files
#apt-get install git-core
#cd /usr/local/sbin
#chmod 666 /dev/null
#chmod 777 /dev/urandom
#ln -s /dev/urandom /dev/random
#apt-get install python python-cheetah python-configobj python-feedparser python-support par2 python-openssl python-yenc unzip unrar python-dbus sudo
#exit
You should no longer be on SSH as root

Installation SABnzbd
SSH back as newuser (Remember newuser is the account name that you created above) and install Sabnzbd (Current Version 0.6.15 as of this writing)
ssh newuser@your.nas.ip
$cd /home/newuser/
$wget sttp://voxel.dl.sourceforge.net/project/sabnzbdplus/sabnzbdplus/sabnzbd-0.6.15/SABnzbd-0.6.15-src.tar.gz  (Change sttp to http)
$tar xzvf SABnzbd-0.6.15-src.tar.gz
$mv SABnzbd-0.6.15 SABnzbd
$rm SABnzbd-0.6.15-src.tar.gz
$mkdir .sabnzbd
$ls -a (There should be a SABnzbd and .sabzbd listed)

The command below will start Sabnzbd
$python SABnzbd/SABnzbd.py -d -f .sabnzbd/sabnzbd.ini -s your.nas.ip:8080
Allow at least a minute than check your.nas.ip:8080 on your internet browser.
There should be a wizard to setup Sabnzbd. If you don't than you did something wrong go back to installing SABnzbd)

Only install those applications that you want as the NAS has limited resources - Sickbeard (TV Shows) - CouchPotato (Movies) - Headphones (Music)
$git clone git://github.com/midgetspy/Sick-Beard.git
$git clone git://github.com/RuudBurger/CouchPotato.git
$git clone git://github.com/rembo10/headphones.git

The commands below will start each application allow a minute between starts
$python Sick-Beard/SickBeard.py -d (Located on your.nas.ip:8081)
$python CouchPotato/CouchPotato.py -d (Located on your.nas.ip:5000)
$python headphones/Headphones.py -d (Located on your.nas.ip:8181)

At this point all the applications are running on your NAS.

The site below has guides for SABnzbd, Sickbeard, CouchPotato and Headphone.

http://www.ainer.org/sabnzbd-install-se … linux-mint

FYI, when setting up SABnzbd and SickBeard make sure the permissions on the download and show directory are open and recursive.

(i.e chmod 777 -R /mnt/HD/HD_a2/Downloads)


***** Autostarting SABnzbd, Sickbeard, CouchPotato and Headphone *****

SSH as root
#nano /etc/init.d/sabnzbd

Copy text below in the file and remember to replace newuser with the account your created ,{your.nas.ip} with your correct NAS ip and {myapikey} with your SABnzbd api

Code:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          SABnzbd
# Required-Start:    $network $remote_fs $syslog
# Required-Stop:     $network $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start SABnzd at boot time
# Description:       Start SABnzbd.
### END INIT INFO

case "$1" in
start)
  echo "Starting SABnzbd."
  /usr/bin/sudo -u root -H /home/newuser/SABnzbd/SABnzbd.py -d -f /home/newuser/.sabnzbd/sabnzbd.ini
;;
stop)
  echo "Shutting down SABnzbd."
  /usr/bin/wget -q --delete-after "http://{your.nas.ip}:8080/sabnzbd/api?mode=shutdown&apikey={myapikey}"
;;
*)
  echo "Usage: $0 {start|stop}"
  exit 1
esac

exit 0

--- Hit Control o to write file than Control x to exit file ---

#chmod 755 /etc/init.d/sabnzbd
#update-rc.d sabnzbd defaults

Add to Boot startup
#nano /boot/linuxrc (add text below to bottom of file)

Code:

# START SickBeard CouchPotato Headphone
/etc/init.d/mediaservers.sh

# START SABnzbd
service sabnzbd start

--- Hit Control o to write file than Control x to exit file ---

nano /etc/init.d/mediaservers.sh (Copy text below in file and remember to change newuser)

Code:

#!/bin/bash
su root -c "chmod 666 /dev/null"
su newuser -c "python /home/newuser/CouchPotato/CouchPotato.py -d"
su newuser -c "python /home/newuser/Sick-Beard/SickBeard.py -d"
su newuser -c "python /home/newuser/headphones/Headphones.py -d"

--- Hit Control o to write file than Control x to exit file ---

#chmod 755 /etc/init.d/mediaservers.sh
#exit

Restart NAS from Dlink web interface to see if applications autostarted.
(Allow at least 3 mins after complete restart for all applications to be available)


***** Updating SABnzbd *****

Headphones, Sickbeard and Couchpotato have a buildin updater, Sabnzbdplus doesn't.

SSH as newuser  (newuser = name of new account that you created)
Confirm that you are in the right directory and the SABnzbd directory is there
$ls -a

Download and Update SABnzbd - To determine lastest version visit sabnzbd.org (replace the 0.x.x by whatever current version number (ie 0.6.15)
$wget http://voxel.dl.sourceforge.net/project … src.tar.gz

$rm -R SABnzbd
$tar xzvf SABnzbd-0.x.x-src.tar.gz
$mv SABnzbd-0.x.x SABnzbd
$rm SABnzbd-0.x.x-src.tar.gz
$python SABnzbd/SABnzbd.py -d -f .sabnzbd/sabnzbd.ini -s NAS_IP:8080


Please let me know if I can make improvements.

Last edited by Terrabyte (2012-03-11 02:08:45)

Offline

 

#2 2011-12-17 13:47:25

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

top guide mate, spot on. The only thing i got a question on is the mounting of the second drive, is that nessesery with a raid 1 conguration? Im pretty new to all this and i wanna make sure i understand it before i attempt it!

Offline

 

#3 2011-12-17 14:23:52

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

just following your guide mate, from scratch.

Im up to the bit were i run sickbeard to configure it, comes up with python: command not found.

you need to add in to install python, im assuming it will be:

apt-get install python

you also need cheetah for sickbeard

apt-get install python-cheetah

need to chmod 777 the sickbeard and couchpotato folder to!

Last edited by danfozzy (2011-12-17 14:37:03)

Offline

 

#4 2011-12-19 05:57:40

Terrabyte
Member
Registered: 2011-08-19
Posts: 96

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

I moved the config of Sickbeard & CouchPotato till after Sabnzbd is installed. That way all requirements will be preinstalled with Sabnzbd.

danfuzzy - with raid 1 there is no need to mount as it is mirroring. so you can skip the section on mounting the 2nd drive.

Last edited by Terrabyte (2011-12-19 06:08:01)

Offline

 

#5 2011-12-22 12:37:39

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

no probs smile

the only probs im getting now is the auto starting. By checking the couchpotato and sickbeard logs they are starting on boot, but then i get this as soon as each one starts up:

sickbeard.log

Dec-22 11:27:23 INFO     MAIN :: Signal 15 caught, saving and exiting...
Dec-22 11:27:24 INFO     MAIN :: Aborting all threads
Dec-22 11:27:24 INFO     MAIN :: Waiting for the SEARCH thread to exit
Dec-22 11:27:24 INFO     MAIN :: Waiting for the BACKLOG thread to exit
Dec-22 11:27:24 INFO     MAIN :: Waiting for the SHOWUPDATER thread to exit
Dec-22 11:27:25 INFO     MAIN :: Waiting for the VERSIONCHECKER thread to exit

coutchpotato.log

11:16:52 INFO  [                   ENGINE] Caught signal SIGINT.
11:16:52 INFO  [                   ENGINE] Bus STOPPING
11:16:52 INFO  [                   ENGINE] HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 5000)) shut down
11:16:52 INFO  [                   ENGINE] Stopped thread '_TimeoutMonitor'.
11:16:52 INFO  [             app.lib.cron] Stopping Cronjobs.
11:16:52 INFO  [    app.lib.cron.subtitle] SubtitleCron shutting down.
11:16:55 INFO  [     app.lib.cron.renamer] Renamer has shutdown.
11:17:05 INFO  [        app.lib.cron.yarr] YarrCron has shutdown.
11:17:06 INFO  [         app.lib.cron.eta] ETA thread shutting down.
11:17:11 INFO  [     app.lib.cron.trailer] TrailerCron shutting down.
11:17:11 INFO  [                   ENGINE] Bus STOPPED
11:17:11 INFO  [                   ENGINE] Bus EXITING
11:17:11 INFO  [                   ENGINE] Caught signal SIGINT.
11:17:11 INFO  [                   ENGINE] Bus STOPPING
11:17:11 INFO  [                   ENGINE] HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 5000)) already shut down
11:17:11 INFO  [                   ENGINE] No thread running for None.
11:17:11 INFO  [             app.lib.cron] Stopping Cronjobs.
11:17:11 INFO  [                   ENGINE] Bus STOPPED
11:17:11 INFO  [                   ENGINE] Bus EXITING
11:17:11 INFO  [                   ENGINE] Bus EXITED
11:17:11 INFO  [                   ENGINE] PID file removed: '-d'.
11:17:11 INFO  [                   ENGINE] Bus EXITED
11:17:11 INFO  [                   ENGINE] Waiting for child threads to terminate...


any idea how to tackle this signal 15 ??

Offline

 

#6 2011-12-23 21:07:37

Terrabyte
Member
Registered: 2011-08-19
Posts: 96

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

Looks like there was in error in the auto start script for Sickbeard & CouchPotato.

Was
su sagemedia -c "python /home/newuser/CouchPotato/CouchPotato.py -d"
su sagemedia -c "python /home/newuser/Sick-Beard/SickBeard.py -d"

Now
su newuser -c "python /home/newuser/CouchPotato/CouchPotato.py -d"
su newuser -c "python /home/newuser/Sick-Beard/SickBeard.py -d"

newuser is the account the you created.

Just edit the /etc/init.d/mediaservers.sh and see if it works...also remember to set permission to 755 or 777.

Offline

 

#7 2012-01-01 20:32:34

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

brilliant, that was the key! all running and working like a charm! thanks mate!

now the next task for me is to try find a way to improve the cooling, that fan is hell of a noisy!

Offline

 

#8 2012-01-01 23:54:47

blackforce
New member
Registered: 2012-01-01
Posts: 1

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

Excellent guide worked well.

However I have a 50MB line and find that sabnzb can only manage 1.4MB/sec.

Quick but no where near maxing my line out.

Offline

 

#9 2012-01-02 03:46:54

Terrabyte
Member
Registered: 2011-08-19
Posts: 96

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

blackforce wrote:

Excellent guide worked well.

However I have a 50MB line and find that sabnzb can only manage 1.4MB/sec.

Quick but no where near maxing my line out.

I am no expert but I think that might be limited by the CPU. My theory is that the more throughput coming down the faster the CPU has to process it. (ie, biding the rar files on top of normal software and services overhead, etc)

So CPU limits downloading any faster. BTW, if I had a 50MB line I would be jumping for joy...

Offline

 

#10 2012-02-11 18:15:26

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

I'm running into probs that my incompleted items in the incomplete folder wont delete, ive chmod 777 the folders and files in there but i have to do this every time i get a new nzb, seems its a sabnzb permissions thing. I've set the permission in the SABnzbd settings to 777 but to no joy!

Can I make the user that runs SABnzbd to force creation of files with a permission of 777?

Offline

 

#11 2012-02-11 21:15:25

Terrabyte
Member
Registered: 2011-08-19
Posts: 96

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

danfozzy wrote:

I'm running into probs that my incompleted items in the incomplete folder wont delete, ive chmod 777 the folders and files in there but i have to do this every time i get a new nzb, seems its a sabnzb permissions thing. I've set the permission in the SABnzbd settings to 777 but to no joy!

Can I make the user that runs SABnzbd to force creation of files with a permission of 777?

You might want to ask that question on the Sabnzbd forums. But from my experience the incompletes are never deleted. They remain there so you can fix the incompletes yourself with the par2repair command. The command tells you which files are bad than you just download those files and repair than manual with same command.

Offline

 

#12 2012-02-11 21:58:13

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

aye, but even after a completed download, the folder doesnt get cleaned up from the incomplete folder. Everything moves over to the complete folder, except its master folder, and u cant manually delete it in windows, you have to remove it by changing its permission, which is a pain for every time u get something new, or remove it with the rm -rf command as root which again is a pain!

Offline

 

#13 2012-02-12 02:52:55

Terrabyte
Member
Registered: 2011-08-19
Posts: 96

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

OK, I understand now...

That is a problem. Where is the download folder containing complete and incomplete? Who's home directory? (ie newuser account that you created)

That looks like a permission issue...

Last edited by Terrabyte (2012-02-12 02:53:53)

Offline

 

#14 2012-02-12 12:57:30

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

Download dir =
/mnt/HD/HD_a2/Downloads/incomplete
/mnt/HD/HD_a2/Downloads/complete

Sabnzbd is installed into user danfozzy = /home/danfozzy/SABnzbd
Have Sickbeard, couch potato and headphones installed under danfozzy too.

Permission of folders in the incomplete folder that won't delete normally = drwxrwxrwx 3 danfozzy danfozzy

Completed download in the /complete folder of the same download = drwxrwxrwx 2 danfozzy danfozzy

Incomplete problem folder = I can rename the folder in windows but I can't delete it. Can only deleted with ssh in as root or danfozzy

Complete folder downloads = can do what I want with windows

Last edited by danfozzy (2012-02-12 13:20:45)

Offline

 

#15 2012-02-12 12:59:21

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

It's the same with the albums I download using headphones, using sabnzbd, I can delete the files individually, but not there folders?

Offline

 

#16 2012-02-12 13:46:44

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

Found my snag, I got it wrong, it's downloads that I have cancelled part downloaded, I have pressed remove nzb, and not remove nzb and delete file

It's a shame that pressing remove nzb doesn't change the permissions so it can be easily removed later on

Offline

 

#17 2012-02-12 18:32:11

Terrabyte
Member
Registered: 2011-08-19
Posts: 96

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

Good to hear that you got it worked out...

Are you having allot issues with incompletes? Who is your usenet provider?

I can't say I have that many problems...only with the real old stuff

Offline

 

#18 2012-02-12 19:09:05

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

I'm with astraweb, I've not experience anything as bad as having loads of incompletes but I have heard that there is a prob around the 300 to 500 day mark on astraweb

Offline

 

#19 2012-02-12 21:02:33

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

For info on the problem I was having, I've raised it on the sabnzbd forums, http://forums.sabnzbd.org/viewtopic.php … mp;t=10018

One of the developers commented that it should be fixed in the next few releases!

Last edited by danfozzy (2012-02-12 21:04:20)

Offline

 

#20 2012-02-13 01:04:31

66sprite
New member
Registered: 2012-02-13
Posts: 2

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

Thanks for pointing me to this walkthrough danfozzy. I am running into some problems with it though. I keep getting this error:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

I have started from scratch a couple of times but I keep getting the same error. Any ideas?

Offline

 

#21 2012-02-13 01:16:10

66sprite
New member
Registered: 2012-02-13
Posts: 2

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

I got it going, I had a typo when setting the ip address, changed that and it works perfectly now. Thanks for everything.

Offline

 

#22 2012-02-13 04:06:23

Terrabyte
Member
Registered: 2011-08-19
Posts: 96

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

danfozzy wrote:

For info on the problem I was having, I've raised it on the sabnzbd forums, http://forums.sabnzbd.org/viewtopic.php … mp;t=10018

One of the developers commented that it should be fixed in the next few releases!

Do you know of away to upgrade Sabnzbd without messing it up?

I just messed up my whole installation by trying to do "apt-get update" and than "apt-get upgrade".

Last edited by Terrabyte (2012-02-13 04:07:54)

Offline

 

#23 2012-02-13 11:24:13

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

Terrabyte check this post out, it's a good guide in conjunction with yours, includes auto starting sab and also an easy way to upgrade!

https://sourceforge.net/apps/phpbb/open … &t=183

Last edited by danfozzy (2012-02-13 11:24:40)

Offline

 

#24 2012-02-13 11:25:53

danfozzy
Member
Registered: 2011-12-17
Posts: 70

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

66sprite wrote:

I got it going, I had a typo when setting the ip address, changed that and it works perfectly now. Thanks for everything.

No probs, terrabyte did the work smile

Offline

 

#25 2012-02-13 17:56:08

Terrabyte
Member
Registered: 2011-08-19
Posts: 96

Re: Sabnzbd, Sickbeard & CouchPotato on DNS-320

danfozzy wrote:

66sprite wrote:

I got it going, I had a typo when setting the ip address, changed that and it works perfectly now. Thanks for everything.

No probs, terrabyte did the work smile

We should be thanking the developers they are ones doing all the work. That is why I like to donate to the projects to thank them for their hard work.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB