Usenet downloader

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 11:04, 15 March 2008 by Methanoid (Talk | contribs) (Adding a webfrontend)

Jump to: navigation, search

[Sources/Credits Methanoid & Fantasymick on, Caveman on and DrChair at]

This has been tested and works well on a ARM9 Linkstation Live. Should work on others. We are using HellaNZB which is a NZB-based usenet "leech" client which also PAR checks and un-archives the files you have downloaded.


There are 2 options:

Stock firmware/jtymod


ipkg update
ipkg install py24-hellanzb (or py25-hellanzbd if you want to use Python 2.5 rathern than 2.4)

This installs Python, HellaNZB and all the dependencies such as Twisted, RAR, Par2Cmdline and the faster YEnc decoder


You can edit the config file now to get it set up for your provider etc

cd /opt/etc
vi hellanzb.conf

You need to change the settings to match those of your usenet provider (username, password, server,number of connections). Remember, the Linkstation is a NAS box not a high spec PC so don't be too greedy on the number of connections as it might actually make it go slower. For example, I can happily max out a 4Mbit line with 4 connections. Try different numbers and see how you get on.

 # Set both the username and password to 'None' (without the quotes) if your 
 # usenet server does not require authorization 
 defineServer(id = 'your usenet', 
 hosts = [ 'yourusenet:119' ], 
 #hosts = [ '', '' ], 

 username = 'your username', 
 password = 'your password', 
 #username = None, # no auth 
 #password = None, 

 connections = 4, 

 # Important locations 
 Hellanzb.PREFIX_DIR = '/mnt/disk1/shared/download' 

A further important change is to fix the permissions (you want to be able to move files from the download directory presumably?) so change

 Hellanzb.UMASK = 0022   


 Hellanzb.UMASK = 0000

Now there should be and your hellanzb.conf there. Now you can fire up hellanzb either from command line or from script.

cd /opt/bin
python -D (or python25 -D if running Python 2.5)

The -D makes it run in Daemon mode, i.e it runs in the background until stopped.

or you can run via script. Unfortunately the script needs some changes before use

vi /opt/etc/init.d/S71hellanzb

Change it to read

nice /opt/bin/ -D

Then check/fix the permissions/ownership and run it (first time only, it will autostart with the Linkstation in future!)

cd /opt/etc/init.d
chown root /opt/etc/init.d/S71hellanzb 
chmod ugo+rx /opt/etc/init.d/S71hellanzb 
sh S71hellanzb

If everything went well hellanzb is running and will create the necessary sub-dirs in the dir you created


Just pop your NZB file in the /mnt/disk1/shared/download/nzb/daemon.queue dir and hellanzb will start downloading and pop the unarchived resulting files in your destination directory.

You can monitor (without a web frontend) by typing python status

Adding a webfrontend

Realistically you will probably want a web based frontend. Hellahella doesn't seem to want to run, Zussaweb looks pretty for monitoring downloads but the upload NZB and Newzbin ID imports don't work for me. I used Lighttpd but you could use a 2nd instance of Apache or maybe piggyback on the Apache that runs the LS's web interface but it didn't work for me. I chose HellaPHP as it worked 100%, required minimal configuration and the author was prepared to amend it to work 100% on my Linkstation setup. He's also adding some more functionality in future like password protection etc and a new look.

ipkg update
ipkg install lighttpd php-fcgi

You'll need to configure (of course)

vi /opt/etc/lighttpd/lighttpd.conf


 #                               "mod_fastcgi", 




url.access-deny             = ( "~", ".inc" )


url.access-deny             = ( "~", ".inc", ".sqlite" )


#fastcgi.server             = ( ".php" =>
#                               ( "localhost" =>
#                                 (
#                                   "socket" => "/tmp/php-fastcgi.socket",
#                                   "bin-path" => "/usr/local/bin/php"
#                                 )
#                               )
#                             )


fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                   "socket" => "/tmp/php-fastcgi.socket",
                                   "bin-path" => "/opt/bin/php-fcgi"

Give some thought as to where you want to have your webpages. I like mine accessible to my Windows PCs so that I can edit directly in Frontpage or whatever but in this case I won't change the defaults.. Also you may need to open a port to the webserver if you want to have your HellaPHP available remotely over the internet.

Now you are ready to start lighttpd by /opt/etc/init.d/S80lighttpd

Download and unpack HellaPHP. Change the values of $disk and $download_nzb_path in config.php to match your download and NZB directories

Now you can use the interface at http://linkstation:8081/hella/ (or wherever you've popped the HellaPHP index.php and other files)




Adding a webfrontend

Link.png This article is currently a stub. You can help this Wiki by expanding it

. This template will categorize articles that include it into Category:Stubs.