Page 1 of 5 123 ... LastLast
Results 1 to 15 of 67

Thread: SABnzbd with par2cmdline on WL500gP

  1. #1

    SABnzbd with par2cmdline on WL500gP

    SABnzbd is a tool for downloading from usenet. After you feed it a nzb-file, it starts downloading, verifying/repairing using par2 and unpacking using unrar/unzip.

    Prerequisites:
    - You need to be using the OLEG optware repository
    - You need to have a swap-file

    The Howto:

    Install the necessary packages:

    Code:
    ipkg update
    
    ipkg install py-sabnzbd
      or if you want to use python2.5
    ipkg install py25-sabnzbd
    
    ipkg install par2cmdline
    ipkg install unrar
    ipkg install unzip
    The SABnzbd package creates the following directories:

    download_dir = /opt/tmp/SABnzbd/tmp/
    complete_dir = /opt/tmp/downloads/
    nzb_backup_dir = /opt/tmp/SABnzbd/nzb/backup/
    cache_dir = /opt/tmp/SABnzbd/cache/
    log_dir = /opt/var/log/
    dirscan_dir = /opt/tmp/SABnzbd/nzb/

    If thats oke, you only need to fill in your newsservers in /opt/etc/SABnzbd.ini.
    Otherwise, make new directories and change these aswell in the .ini.

    The package also installs a startup-script, S70SABnzbd.

    Finally, this package contains a few patches i made.
    The first one fixes the amount of disk-free-space reported. The second one adds two new options: pause download during assembly and pause download during postprocessing. Both are enabled in the default ini-file the package installs.
    (if you already have SABnzbd installed and are keeping your old ini-file, you might have to add these two options manually to use them.)

    You can start SABnzbd, using the startup-script or a reboot.
    The webinterface is at http://192.168.1.1:8080/sabnzbd/

    Happy leeching.
    Last edited by DrChair; 08-11-2007 at 20:25. Reason: Updated because we have a package now.

  2. #2

    Sabnzb

    Hi . thx for the tutorial ,

    But im running into to a few problems after the installation
    1. is it didnt find celementtree i found out a fix for this was ipkg install py-celementtree instead of your ipkg install py-elementtree .
    2. It still cannot find a few files like rar and unzip while installed with ipkg they seem not detected by Sabnzbd even the chrooted par2 are not found .

    typing in console however give me these files further more my web-iface seems stuck its a white screen where a cherry is seen in browser tabpage the page itself is empty , only thing thats bugging there seems to be a port ?
    I am not sure but i found my only error is it clames port is not free .

    As u see im in need for some help ,maybe u can help me on my way .

    Ps i had to use a slighty diffrent setup from your dir setup but i double checked and cant find any errors in that . :|

    Thanks in advance

  3. #3
    Quote Originally Posted by Cr4sh3d View Post
    1. is it didnt find celementtree i found out a fix for this was ipkg install py-celementtree instead of your ipkg install py-elementtree .
    cElementtree is optional. Installing it might speed-up things, but it should work without.
    More speed is a good thing though, so I'll add it to the howto.

    Quote Originally Posted by Cr4sh3d View Post
    2. It still cannot find a few files like rar and unzip while installed with ipkg they seem not detected by Sabnzbd even the chrooted par2 are not found .
    In my case, it seems that SABnzbd can't find those files, if S70SABnzbd is started by the startup-script rc.unslung. If I manually start S70SABnzbd, it does find those files. I'll need to look into this.

    Quote Originally Posted by Cr4sh3d View Post
    typing in console however give me these files further more my web-iface seems stuck its a white screen where a cherry is seen in browser tabpage the page itself is empty , only thing thats bugging there seems to be a port ?
    I am not sure but i found my only error is it clames port is not free .
    are you using http://192.168.1.1:8080/sabnzbd/ ??
    or perhaps you need to change the port-number in the ini-file.
    Last edited by DrChair; 11-04-2007 at 13:42. Reason: edited point 2

  4. #4

    Startup script

    Any progress bro in solving that yet ?

  5. #5
    Quote Originally Posted by Cr4sh3d View Post
    Any progress bro in solving that yet ?
    nope... I tried several things, but everytime when I let it startup automaticly, it doesn't find par2, unrar and unzip. The strange thing is, that it does find yenc and celementtree.

    for now, I just renamed S70SABnzbd to K70SABnzbd, so that it doesn't start during the boot, and start it manually afterwards.

  6. #6

    Webfrontend errors

    I found that when i tried the webface of sabnzbd it came back with an internal error .
    Now you and me might found that but i doubt if all users will find it .
    So if you please consider in adding this line in your tutorial.With your favorite editor , edit /opt/etc/SABnzbd.ini and look for this lines

    ## web file dir for (custom) Cheetah templates and the default.css file
    web_dir = ""

    and change them into

    ## web file dir for (custom) Cheetah templates and the default.css file
    web_dir = "/opt/local/share/SABnzbd-0.2.5/templates/"

    then your webface of sabnzbd will be working . Atleast mine does
    Thanks DrChair for updating things .

  7. #7
    Thanks, i have it running.

    I have only one problem left. I use a WL700gE and those devices do not have an writable /.
    I can only use my /opt path. So i cant use the yenc fix.

    Does anybody has an idea.

    Sollie.

  8. #8
    Quote Originally Posted by sollie View Post
    Thanks, i have it running.

    I have only one problem left. I use a WL700gE and those devices do not have an writable /.
    I can only use my /opt path. So i cant use the yenc fix.

    Does anybody has an idea.

    Sollie.
    The WL500gP also doesn't have a writeable /. That's why i mount a folder that is writable over the exisiting /home, so that you get a writable /home.
    (mount --bind /opt/tmp/home /home)

  9. #9
    Yeah, ok. But i do not have an /home dir and i cant create it.
    Code:
    mount: mounting /opt/tmp/home on /home failed
    Sollie.

  10. #10
    Join Date
    May 2007
    Location
    Utrecht, Netherlands
    Posts
    4

    Runing but unstable

    Hi all,

    Thanks for the very clear tutorial, always good for a relative newbie on linux like me.

    I do have a question though, i'have it all working on an wl500gp with an ext2 formatted HDD, swap enabled, 32 Mb of Ram. When i run 'top' it says to only consume 35 % of memory and about 5% of CPU.

    Still the system is not stable: it runs between one and 4-5 hours and then it dies. No real indication in the logs why...

    Anyone with the same problems or is it running stable for you??

    Regards

  11. #11
    Quote Originally Posted by sollie View Post
    Yeah, ok. But i do not have an /home dir and i cant create it.
    Then, there are two options:
    One: fix the python package
    Two: make an yenc package

    (or maybe three: I send you the compiled yenc (if i can find it on my router), you manually copy it in place and hope that it works)

  12. #12
    Quote Originally Posted by rowi View Post
    Still the system is not stable: it runs between one and 4-5 hours and then it dies. No real indication in the logs why...

    Anyone with the same problems or is it running stable for you??
    Well it is a heavy program, especially on memory usage. I'm using a 512 MB swap-file, but if I add more than 2 dvd-nzbs to the queue, after a while (especially during repair), the router runs out of memory, and kills the SABnzbd.py processes.

    So most of the time, I add one nzb, wait till it's done, and add the next.

    I'm planning on writing a script (cronjob), that watches the tmp-folder, and if the tmp-folder is empty (meaning the nzb is finished), it can move the next nzb into the nzb-import-dir.
    But I'm short in time and shell-scripting isn't a daily routine for me. So if there are volunteers...
    Last edited by DrChair; 01-06-2007 at 19:39. Reason: corrected the swap-size

  13. #13
    Join Date
    May 2007
    Location
    Utrecht, Netherlands
    Posts
    4
    Quote Originally Posted by DrChair View Post
    Well it is a heavy program, especially on memory usage. I'm using a 512 MB swap-file, but if I add more than 2 dvd-nzbs to the queue, after a while (especially during repair), the router runs out of memory, and kills the SABnzbd.py processes.
    Ok same here, 512 swap and big ext2 partiotion for data. I know that we push these boxes to the limits with these applications but hey...thats the fun

    I was also thinking of a cronjob to restart the proces but ofcourse the best would be not to have the system kill the proces. I might try to put some time in your idea of adding the nzb's one by one (maybe combined with restarting the system if needed).

    By the way, instead of manually restarting SAB after reboot i just added the line
    Code:
    /opt/local/bin/SABnzbd.py -f /opt/etc/SABnzbd.ini -d
    at the bottom of my post-boot file, after every reboot SAB is automaticaly started.

  14. #14
    Quote Originally Posted by rowi View Post
    By the way, instead of manually restarting SAB after reboot i just added the line
    Code:
    /opt/local/bin/SABnzbd.py -f /opt/etc/SABnzbd.ini -d
    at the bottom of my post-boot file, after every reboot SAB is automaticaly started.
    If I do that, it can't find par2 and unrar, during startup. Does it do find those in your setup??

  15. #15
    Join Date
    May 2007
    Location
    Utrecht, Netherlands
    Posts
    4

    Still unstable - but "solved" startup

    Quote Originally Posted by DrChair View Post
    If I do that, it can't find par2 and unrar, during startup. Does it do find those in your setup??
    Hi DrChair,

    Sorry for the late reply. Actually my system stays quite unstable. And you where right, par2 and unrar where not found in de SABnzbd.log with my addition in the post-boot. So alternatively i tried something different. With a cron system already installed (thanx to macsat for his tutorial) i added a new shell script in my cron.5mins. Now every 5 minutes it checks if a python process is running. If not i start SABnzbd with the startup file. If the process is running i do nothing.

    After reboot cron is loaded and within 5 minutes SABnzbd is running automaticaly. Together with the queu saving this also solves most of the stability issues because after breakdown i get an automatic restart.

    And moreover...with this option par2 and unrar are loaded correctly.

    Underneath you find the shell file i use:
    -save it as sabnzbd.sh
    -place file somewhere in the cron folders (i used 5mins)
    -and make it executable with a chmod 755.

    Code:
    #!/bin/sh
    SERVICE='python'
    
    if ps | grep -v grep | grep $SERVICE > /dev/null
    then
        echo "$SERVICE service running, everything is fine"
    else
        echo "$SERVICE was not running, restarting"
        startSABnzbd
    fi
    Hope this works for you too.

Page 1 of 5 123 ... LastLast

Similar Threads

  1. par2cmdline
    By zeus24 in forum WL-500g Custom Development
    Replies: 1
    Last Post: 08-04-2007, 22:46
  2. WL500gP achter modemrouter internet probleem
    By rinusr in forum Dutch Discussion - Nederlands
    Replies: 4
    Last Post: 01-04-2007, 12:49
  3. WL500gP - WL500gP Experten Frage
    By fred4711 in forum German Discussion - Deutsch (DE)
    Replies: 8
    Last Post: 09-02-2007, 22:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •