It is currently May 25th, 2013, 3:27 am Advanced search

How to run NZBGET on the AIOS

Product usage Guides and Tips.. see what you are missing!

How to run NZBGET on the AIOS

Postby aasoror » November 13th, 2011, 6:07 pm

Task: Running NZBGET on the AIOS
Difficulty: Moderate
Creativity: Low
Applicable to: Semiofficial firmware R6+

I.Installing Prerequisites:
Telnet to the AIOS and install the required packages (and dependencies) using optware

Code: Select all
/opt/bin/ipkg update
/opt/bin/ipkg install nzbget
/opt/bin/ipkg install php-fcgi
/opt/bin/ipkg install par2cmdline
/opt/bin/ipkg install unrar
/opt/bin/ipkg install cron



Now the SemiOfficial R6 comes with the required webinterface and webserver (customized to the AIOS paths).
Expectantly the client is installed on the AIOS very limited internal storage while will be filled up 10 seconds after firing up any download.

Before we start the client we need to first move client to local storage (USB or internal HDD), there are many approaches to do this, but here is the easiest and most straight forward way: move the /usr/local/etc/newsbin to wherever you like, then put a simlink in its place to forward to the new location. (the following assumes the usage of a external storage).

Code: Select all
cp /usr/local/etc/newsbin /tmp/usbmounts/sdb1/  -r
rm /usr/local/etc/newsbin -r
ln -s /tmp/usbmounts/sdb1/newsbin /usr/local/etc/newsbin


Now lets start the client and the web interface

Code: Select all
/usr/local/etc/newsbin/startnzbget.sh start
/usr/local/etc/newsbin/startweb.sh start


Now open the webinterface ( http://AIOS.IP:8000 ) and configure your sever details.

Finally, to start it (client and web interface) whenever the box boots just add the last two commands to your "/usr/local/etc/rcS" file.

Enjoy

Image
The AIOS wiki - The AIOS Semiofficial firmwares
Calling upon ALL AIOSers, your feedback is needed -- Calling upon ALL XIOSers, your feedback is needed
XIOS XBMC: Setup, Nightlies: M1 - M3 - Android - Keep the annoying XIOS developers happy, always attach a log with your bug report, here is how.
User avatar
aasoror
Pivos Employee
 
Posts: 8461
Joined: September 26th, 2011, 4:18 pm

Re: How to run NZBGET on the AIOS

Postby legato » November 13th, 2011, 7:47 pm

wow, that was fast! thanks so much for the effort put into this, I got my aios yesterday, will get this running tonight! :)

Cheers!
legato
 
Posts: 12
Joined: November 11th, 2011, 6:07 pm

Re: How to run NZBGET on the AIOS

Postby legato » November 30th, 2011, 9:42 pm

Hello Aarosor,

I noticed that after enabling nzbget, if I'm watching a movie (doesn't matter if it's 720 or 1080p), it will stutter every couple of minutes.

I checked the time this happens and it coincides with the time each rar file is consolidated (from articles). Are you using nzbget? did you experience anything similar?

The workaround I'm using now is to pause the queue when I'm watching a movie, but I've been thinking if there's any other solutions, like reduce the process priority (do we have "nice" in busybox?), or maybe switch some option in the program itself (maybe directwrite would help)?

Any ideas? :)

Thanks!
legato
 
Posts: 12
Joined: November 11th, 2011, 6:07 pm

Re: How to run NZBGET on the AIOS

Postby aasoror » November 30th, 2011, 10:05 pm

legato wrote:The workaround I'm using now is to pause the queue when I'm watching a movie


The CPU is a bottleneck here, any other solution will just fail at one point or the other. I would recommend exactly what you did (pausing the server) till you are done with watching the movie. The fact is for optimal experience its recommended to shutdown whatever non-playback related services you have running (transmission, ftp, samba).

Shutting down nzbget should be easy because you can access the web interface from the AIOS web browser.

btw we do have "nice" on the busybox version running on our AIOS.
The AIOS wiki - The AIOS Semiofficial firmwares
Calling upon ALL AIOSers, your feedback is needed -- Calling upon ALL XIOSers, your feedback is needed
XIOS XBMC: Setup, Nightlies: M1 - M3 - Android - Keep the annoying XIOS developers happy, always attach a log with your bug report, here is how.
User avatar
aasoror
Pivos Employee
 
Posts: 8461
Joined: September 26th, 2011, 4:18 pm

Re: How to run NZBGET on the AIOS

Postby lotus_pivos » December 13th, 2011, 7:23 am

for some reason, i wasnt able to get this to work...
my log. sorry for the crude nature ..where did i go wrong :(

/usr/local/etc/linked/opt/bin # /opt/bin/ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... ackages.gz
Inflating http://ipkg.nslu2-linux.org/feeds/optwa ... ackages.gz
Updated list of available packages in /opt/lib/ipkg/lists/optware
Successfully terminated.
/usr/local/etc/linked/opt/bin # /opt/bin/ipkg install nzbget
Installing nzbget (0.7.0-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing ncurses (5.7-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing libxml2 (2.7.8-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing libpar2 (0.2-5) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing libsigc++ (2.2.3-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing libuclibc++ (0.2.2-9) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Configuring libpar2
Configuring libsigc++
Configuring libuclibc++
Configuring libxml2
Configuring ncurses
update-alternatives: Linking //opt/bin/clear to /opt/bin/ncurses-clear
Configuring nzbget
Successfully terminated.
/usr/local/etc/linked/opt/bin # /opt/bin/ipkg install php-fcgi
Installing php-fcgi (5.2.17-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing php (5.2.17-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing bzip2 (1.0.6-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing libxslt (1.1.26-2) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing gdbm (1.8.3-2) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing libdb (4.2.52-3) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing pcre (8.20-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing cyrus-sasl-libs (2.1.23-2) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing psmisc (22.13-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Installing openldap-libs (2.3.43-2) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Configuring bzip2
update-alternatives: Linking //opt/bin/bzip2 to /opt/bin/bzip2-bzip2
Configuring cyrus-sasl-libs
Configuring gdbm
Configuring libdb
Configuring libxslt
Configuring openldap-libs
Configuring pcre
Configuring php
Configuring php-fcgi
Configuring psmisc
update-alternatives: Linking //opt/bin/killall to /opt/bin/psmisc-killall
update-alternatives: Linking //opt/bin/pidof to /opt/bin/psmisc-killall
Successfully terminated.
/usr/local/etc/linked/opt/bin # /opt/bin/ipkg install par2cmdline
Installing par2cmdline (0.4-4) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Configuring par2cmdline
Successfully terminated.
/usr/local/etc/linked/opt/bin # /opt/bin/ipkg install unrar
Installing unrar (3.9.8-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Configuring unrar
Successfully terminated.
/usr/local/etc/linked/opt/bin # /opt/bin/ipkg install cron
Installing cron (4.1-9) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optwa ... mipsel.ipk
Configuring cron
Remember that the system crontab file is "/opt/etc/crontab".
Successfully terminated.
/usr/local/etc/linked/opt/bin # cp /usr/local/etc/newsbin /tmp/usbmounts/sdb1/ -r
/usr/local/etc/linked/opt/bin # rm /usr/local/etc/newsbin -r
/usr/local/etc/linked/opt/bin # ln -s /tmp/usbmounts/sdb1/newsbin /usr/local/etc/newsbin
/usr/local/etc/linked/opt/bin # /usr/local/etc/newsbin/startnzbget.sh start
-sh: /usr/local/etc/newsbin/startnzbget.sh: not found
/usr/local/etc/linked/opt/bin # /usr/local/etc/newsbin/startweb.sh start
-sh: /usr/local/etc/newsbin/startweb.sh: not found
/usr/local/etc/linked/opt/bin # cd /usr
/usr # ls
bin local sbin share
/usr # cd local/etc
/usr/local/etc # ls
certs hdd ld.so.conf newsbin rcS
directfbrc hdd.old linked passwd resolv.conf
dvdplayer hostname lost+found ppp shutdown.sh
group hosts magic profile skin_pack
/usr/local/etc # cd newsbin
-sh: cd: can't cd to newsbin
/usr/local/etc # ls
certs hdd ld.so.conf newsbin rcS
directfbrc hdd.old linked passwd resolv.conf
dvdplayer hostname lost+found ppp shutdown.sh
group hosts magic profile skin_pack
/usr/local/etc # ls -l
drwxr-xr-x 1 root root 2048 Dec 12 23:35 certs
-rw-r--r-- 1 root root 2081 Dec 12 23:33 directfbrc
drwxrwxr-x 1 root root 2048 Dec 13 2011 dvdplayer
-rw-rw-r-- 1 root root 107 May 11 2011 group
lrwxrwxrwx 1 root root 8 Dec 12 23:31 hdd -> /tmp/hdd
drwxrwxr-x 1 root root 2048 May 11 2011 hdd.old
-rw-rw-r-- 1 root root 5 Dec 10 06:04 hostname
-rw-rw-r-- 1 root root 20 May 11 2011 hosts
-rw-rw-r-- 1 root root 5 May 11 2011 ld.so.conf
drwxrwxr-x 1 root root 2048 Dec 11 04:17 linked
drw-rw-rw- 1 root root 2048 Dec 13 2011 lost+found
-rw-rw-r-- 1 root root 4 May 11 2011 magic
lrwxrwxrwx 1 root root 27 Dec 13 07:33 newsbin -> /tmp/usbmounts/sdb1/newsbin
-rw-rw-r-- 1 root root 463 May 11 2011 passwd
drwxr-xr-x 1 root root 2048 Sep 9 05:44 ppp
-rw-rw-r-- 1 root root 1085 May 11 2011 profile
-rwxrwxr-x 1 root root 1855 Oct 24 02:24 rcS
-rw------- 1 root root 67 Dec 13 2011 resolv.conf
-rw-rw-r-- 1 root root 55 Sep 9 07:32 shutdown.sh
drwxrwxr-x 1 root root 2048 Dec 10 06:04 skin_pack
/usr/local/etc # pwd
/usr/local/etc
/usr/local/etc # cd newsbin
-sh: cd: can't cd to newsbin
/usr/local/etc # ls -l
drwxr-xr-x 1 root root 2048 Dec 12 23:35 certs
-rw-r--r-- 1 root root 2081 Dec 12 23:33 directfbrc
drwxrwxr-x 1 root root 2048 Dec 13 2011 dvdplayer
-rw-rw-r-- 1 root root 107 May 11 2011 group
lrwxrwxrwx 1 root root 8 Dec 12 23:31 hdd -> /tmp/hdd
drwxrwxr-x 1 root root 2048 May 11 2011 hdd.old
-rw-rw-r-- 1 root root 5 Dec 10 06:04 hostname
-rw-rw-r-- 1 root root 20 May 11 2011 hosts
-rw-rw-r-- 1 root root 5 May 11 2011 ld.so.conf
drwxrwxr-x 1 root root 2048 Dec 11 04:17 linked
drw-rw-rw- 1 root root 2048 Dec 13 2011 lost+found
-rw-rw-r-- 1 root root 4 May 11 2011 magic
lrwxrwxrwx 1 root root 27 Dec 13 07:33 newsbin -> /tmp/usbmounts/sdb1/newsbin
-rw-rw-r-- 1 root root 463 May 11 2011 passwd
drwxr-xr-x 1 root root 2048 Sep 9 05:44 ppp
-rw-rw-r-- 1 root root 1085 May 11 2011 profile
-rwxrwxr-x 1 root root 1855 Oct 24 02:24 rcS
-rw------- 1 root root 67 Dec 13 2011 resolv.conf
-rw-rw-r-- 1 root root 55 Sep 9 07:32 shutdown.sh
drwxrwxr-x 1 root root 2048 Dec 10 06:04 skin_pack
/usr/local/etc # cd /opt
/usr/local/etc/linked/opt # cd opt
-sh: cd: can't cd to opt
/usr/local/etc/linked/opt # cd ..
/ # ls
Test.fat etc opt tmp
bin lib proc tmp_orig
blueberry-vfd-opt linuxrc sbin usr
dev mnt sys var
/ # cd opt
/usr/local/etc/linked/opt # ls 0
ls: 0: No such file or directory
/usr/local/etc/linked/opt # ls -l
-rwxrw-r-- 1 root root 27 Sep 9 07:33 S20vsftpd
-rwxrw-r-- 1 root root 206 Sep 9 07:33 S50transmission
drwxr-xr-x 1 root root 2048 Dec 13 07:33 bin
drwxr-xr-x 1 root root 2048 Dec 13 07:31 doc
drwxr-xr-x 1 root root 2048 Dec 13 07:33 etc
drwxr-xr-x 1 root root 2048 Dec 13 07:31 include
drwxr-xr-x 1 root root 2048 Dec 13 07:31 lib
drwxr-xr-x 1 root root 2048 Dec 13 07:33 man
drwxr-xr-x 1 root root 2048 Dec 13 07:33 sbin
drwxr-xr-x 1 root root 2048 May 22 2010 share
drwxr-xr-x 1 root root 2048 Sep 9 07:33 tmp
drwxr-xr-x 1 root root 2048 Sep 9 07:33 usr
drwxr-xr-x 1 root root 2048 Dec 13 07:33 var
/usr/local/etc/linked/opt # cd usr
/usr/local/etc/linked/opt/usr # ls -l
drwxr-xr-x 1 root root 2048 Sep 9 07:33 lib
/usr/local/etc/linked/opt/usr # cd lib
/usr/local/etc/linked/opt/usr/lib # ls -l
/usr/local/etc/linked/opt/usr/lib # ls
/usr/local/etc/linked/opt/usr/lib # cd ..
/usr/local/etc/linked/opt/usr # cd ..
/usr/local/etc/linked/opt # ls
S20vsftpd etc sbin var
S50transmission include share
bin lib tmp
doc man usr
/usr/local/etc/linked/opt # cd ..
/ # cd ..
/ # ls
Test.fat etc opt tmp
bin lib proc tmp_orig
blueberry-vfd-opt linuxrc sbin usr
dev mnt sys var
/ # cd /usr/local
/usr/local # ls
bin etc firmware hostname lib sbin
/usr/local # cd ..
/usr # cd /tmp
/tmp # ks
-sh: ks: not found
/tmp # ls
CGI_request dht_torrent netb
appContext filedump nvram
btdownload gtalkSock package
btsock hd0 priv.dat
cached hdd ramfs
consumer_data.txt lib run
devcert.dat lock smb
devcerttemplate.dat log usbmounts
dht_node net www
/tmp # cd usbmounts/
/tmp/usbmounts # ls
sda5 sdb1
/tmp/usbmounts # cd sdb1/
/tmp/usbmounts/sdb1 # ls
bin ffp.subr startweb.sh
conf startnzbget.sh web
/tmp/usbmounts/sdb1 # ./startweb.sh
./startweb.sh: .: 6: Can't open /usr/local/etc/newsbin/ffp.subr
/tmp/usbmounts/sdb1 # ls -l
drwxr-xr-x 2 root root 0 Dec 13 07:33 bin
drwxr-xr-x 2 root root 0 Dec 13 07:33 conf
-rwxr-xr-x 1 root root 3721 Dec 13 07:33 ffp.subr
-rwxr-xr-x 1 root root 400 Dec 13 07:33 startnzbget.sh
-rwxr-xr-x 1 root root 278 Dec 13 07:33 startweb.sh
drwxr-xr-x 4 root root 0 Dec 13 07:33 web
/tmp/usbmounts/sdb1 # ./startnzgbet.sh
-sh: ./startnzgbet.sh: not found
/tmp/usbmounts/sdb1 # ./startnzbget.sh
./startnzbget.sh: .: 5: Can't open /usr/local/etc/newsbin/ffp.subr
/tmp/usbmounts/sdb1 #
lotus_pivos
 
Posts: 10
Joined: December 13th, 2011, 7:14 am

Re: How to run NZBGET on the AIOS

Postby aasoror » December 13th, 2011, 11:52 am

lotus_pivos wrote:/tmp/usbmounts/sdb1 # ls
bin ffp.subr startweb.sh
conf startnzbget.sh web

Thats where it went wrong, the contents of the newsbin got coppied to /tmp/usbmounts/sdb1 instead of the folder. So the path /tmp/usbmounts/sdb1/newsbin doesn't exist.

To solve this you can just create the folder and move the files to it.
Or, if you want to do it from scratch you can reflash (to get the contents of /usr/local/etc/newsbin) and

Replace this
Code: Select all
cp /usr/local/etc/newsbin /tmp/usbmounts/sdb1/  -r
rm /usr/local/etc/newsbin -r

with
Code: Select all
mkdir -p /tmp/usbmounts/sdb1/newsbin
cp /usr/local/etc/newsbin/ /tmp/usbmounts/sdb1/newsbin/  -r
rm /usr/local/etc/newsbin -r
The AIOS wiki - The AIOS Semiofficial firmwares
Calling upon ALL AIOSers, your feedback is needed -- Calling upon ALL XIOSers, your feedback is needed
XIOS XBMC: Setup, Nightlies: M1 - M3 - Android - Keep the annoying XIOS developers happy, always attach a log with your bug report, here is how.
User avatar
aasoror
Pivos Employee
 
Posts: 8461
Joined: September 26th, 2011, 4:18 pm

Re: How to run NZBGET on the AIOS

Postby lotus_pivos » December 13th, 2011, 3:22 pm

thanks .
I was able to configure it correctly but unable to start the webserver..


tmp/usbmounts/sda5/newsbin # ./startweb.sh start
Starting /usr/local/sbin/lighttpd -f /usr/local/etc/newsbin/conf/lighttpd.conf
2011-12-13 23:20:53: (log.c.118) opening errorlog '/usr/local/etc/newsbin/logs/error.log' failed: No such file or directory

The nzbserver start succesfully..any ideas?
lotus_pivos
 
Posts: 10
Joined: December 13th, 2011, 7:14 am

Re: How to run NZBGET on the AIOS

Postby aasoror » December 13th, 2011, 3:39 pm

Is link active ?
what do you get when try to access the "'/usr/local/etc/newsbin/logs" folder ?
It should automatically send you to "/tmp/usbmounts/sda5/newsbin/logs"

lotus_pivos wrote:thanks .
I was able to configure it correctly but unable to start the webserver..


tmp/usbmounts/sda5/newsbin # ./startweb.sh start
Starting /usr/local/sbin/lighttpd -f /usr/local/etc/newsbin/conf/lighttpd.conf
2011-12-13 23:20:53: (log.c.118) opening errorlog '/usr/local/etc/newsbin/logs/error.log' failed: No such file or directory

The nzbserver start succesfully..any ideas?
The AIOS wiki - The AIOS Semiofficial firmwares
Calling upon ALL AIOSers, your feedback is needed -- Calling upon ALL XIOSers, your feedback is needed
XIOS XBMC: Setup, Nightlies: M1 - M3 - Android - Keep the annoying XIOS developers happy, always attach a log with your bug report, here is how.
User avatar
aasoror
Pivos Employee
 
Posts: 8461
Joined: September 26th, 2011, 4:18 pm

Re: How to run NZBGET on the AIOS

Postby lotus_pivos » December 13th, 2011, 3:51 pm

i am now able to start the webserver... for some reason, logs was created so i created it in the HDD and it started successfully..thanks very much...
lotus_pivos
 
Posts: 10
Joined: December 13th, 2011, 7:14 am

Re: How to run NZBGET on the AIOS

Postby aasoror » December 13th, 2011, 4:14 pm

lotus_pivos wrote:i am now able to start the webserver... for some reason, logs was created so i created it in the HDD and it started successfully..thanks very much...


Thanks for the feedback.
I would advise keeping the connection below 10 for stability.
Best of luck,
The AIOS wiki - The AIOS Semiofficial firmwares
Calling upon ALL AIOSers, your feedback is needed -- Calling upon ALL XIOSers, your feedback is needed
XIOS XBMC: Setup, Nightlies: M1 - M3 - Android - Keep the annoying XIOS developers happy, always attach a log with your bug report, here is how.
User avatar
aasoror
Pivos Employee
 
Posts: 8461
Joined: September 26th, 2011, 4:18 pm

Next

Return to AIOS Guides & Tips

Who is online

Users browsing this forum: No registered users and 1 guest