HOW TO: NZBautomator for Entware-ng

Marvell Kirkwood based
Post Reply
burbulence
Posts: 308
Joined: Sun Feb 17, 2013 10:00 pm

HOW TO: NZBautomator for Entware-ng

Post by burbulence » Thu Feb 25, 2016 11:32 am

So Ive modified my script to work with Entware-ng, i have simplified the script as much as i can so all that is needed is to download it and copy the script and the config file to the correct location and reboot your NAS (or enter the start command).

Currently i have SABnzbd Nzbget SickRage CouchPotato Headphones and Mylar running.

The data dirs are /opt/share
the config dirs are /opt/usr/etc/config
i think nzbget uses /opt/share/nzbget, for config. I think this can be changed to the same dir as above, still working on that.

I'm looking for anyone with suggestions for other data locations or anyone willing to test the script.

so far i have it installing all required packages, downloading or updating all data for SB CP SAB Nzbget HP MY, starting or restarting each program as my previous FFP based script did.

burbulence
Posts: 308
Joined: Sun Feb 17, 2013 10:00 pm

Re: HOW TO: NZBautomator for Entware-ng

Post by burbulence » Thu Feb 25, 2016 2:33 pm

OK Where to start, I'm going to assume you have successfully installed Entware-ng, those who haven't the stickied post at the top of this forum explains how.

So first step down, that was easy!... Download https://github.com/burbulence/Autonzb-n ... script.zip This contains the script and the config file required.

Step 3. Unzip the downloaded files and place S80NZBautomator into folder /opt/etc/init.d
Step 4. Place Autonzb.conf into /opt/etc chmod a+x /opt/etc/init.d/NZBautomator
Step 5. cd /opt/etc/init.d sh -x S80NZBautomator start
Step 6. Post the output to pastebin
step 7. Check the required programs are running

SABnzbd should be running on <your-nas-ip>:8085
nzbget should be running on <your-nas-ip>:6789
Couch should be running on <your-nas-ip>:5050
SickRage should be running on <your-nas-ip>:8081
Headphones should be running on <your-nas-ip>:8181
Mylar should be running on <your-nas-ip>:8090

Config Folders /opt/usr/etc/config
nzbget config folder /opt/share/nzbget (this can be changed to above folder after start up)
SAB SickRage Couchpotato Headphones Mylar data folders /opt/share

Headphones by default only listens on local connections so you have to shut it down and edit the config.ini.

Code: Select all

pgrep -f head
that will return the pid of Headphones.

Code: Select all

kill pid from above
edit /opt/usr/etc/config/headphones/config.ini
look for the line http_host and change it from http_host = localhost to http_host = 0.0.0.0

Bear in mind, Bleeding edge, might not work, might break your NAS... THIS IS AN ALPHA SCRIPT!!!!
I think that'll do it. Let me know how it goes!
Last edited by burbulence on Wed Oct 05, 2016 8:47 pm, edited 5 times in total.

burbulence
Posts: 308
Joined: Sun Feb 17, 2013 10:00 pm

Re: HOW TO: NZBautomator for Entware-ng

Post by burbulence » Tue Mar 01, 2016 9:40 am

I had it working over the weekend, now i cant update from git via https, i'm getting the following error

Code: Select all

+ git pull https://github.com/clinton-hall/nzbToMedia.git
fatal: Unable to find remote helper for 'https'

dexhain
Posts: 27
Joined: Tue Apr 02, 2013 11:50 am

Re: HOW TO: NZBautomator for Entware-ng

Post by dexhain » Sun Mar 06, 2016 7:42 pm

burbulence wrote:I had it working over the weekend, now i cant update from git via https, i'm getting the following error

Code: Select all

+ git pull https://github.com/clinton-hall/nzbToMedia.git
fatal: Unable to find remote helper for 'https'
Did you try

Code: Select all

opkg install git-http
first?

burbulence
Posts: 308
Joined: Sun Feb 17, 2013 10:00 pm

Re: HOW TO: NZBautomator for Entware-ng

Post by burbulence » Mon Mar 07, 2016 10:21 pm

yep, that would do it, it seems to be working, ive modified on GitHub so should work for everyone. Ive played around a bit also with the set up of folders for the NAS series drives. If anyone is using this script on one of these can the let me know of any issues.

ibere
Posts: 22
Joined: Sat Jun 20, 2015 4:58 pm

Re: HOW TO: NZBautomator for Entware-ng

Post by ibere » Fri Mar 11, 2016 2:21 pm

/opt/bin/python2: error while loading shared libraries: /opt/lib/libpthread.so.0: file too short

burbulence
Posts: 308
Joined: Sun Feb 17, 2013 10:00 pm

Re: HOW TO: NZBautomator for Entware-ng

Post by burbulence » Sat Mar 12, 2016 9:10 am

It's probably a corrupt file, need to figure out which package libpthread is installed by then remove and reinstall it. I'll look later and get back.

try

Code: Select all

opkg remove libpthread
opkg update
opkg install libpthread

ibere
Posts: 22
Joined: Sat Jun 20, 2015 4:58 pm

Re: HOW TO: NZBautomator for Entware-ng

Post by ibere » Mon Mar 14, 2016 11:53 am

burbulence wrote:It's probably a corrupt file, need to figure out which package libpthread is installed by then remove and reinstall it. I'll look later and get back.

try

Code: Select all

opkg remove libpthread
opkg update
opkg install libpthread
Thanks a lot :mrgreen:

burbulence
Posts: 308
Joined: Sun Feb 17, 2013 10:00 pm

Re: HOW TO: NZBautomator for Entware-ng

Post by burbulence » Mon Mar 14, 2016 12:47 pm

No problem,

If the next person to do a fresh install could do me a favour and pastebin the entire output of the step

Code: Select all

sh -x S80NZBautomator
That would would be great

URBANsUNITED
Posts: 5
Joined: Sun Mar 20, 2016 11:11 am

Re: HOW TO: NZBautomator for Entware-ng

Post by URBANsUNITED » Sun Mar 20, 2016 11:54 am

Here we go

http://pastebin.com/YymFsnHR

and this is with sabnzbd & headphones additionally

http://pastebin.com/f929GwJu

SABnzbd does not install :(

Can't find a fix for this

burbulence
Posts: 308
Joined: Sun Feb 17, 2013 10:00 pm

Re: HOW TO: NZBautomator for Entware-ng

Post by burbulence » Sun Mar 20, 2016 12:55 pm

Think I see the problem, I will try to have a fix for this later today, I assume all the other programs install correctly?

URBANsUNITED
Posts: 5
Joined: Sun Mar 20, 2016 11:11 am

Re: HOW TO: NZBautomator for Entware-ng

Post by URBANsUNITED » Sun Mar 20, 2016 12:58 pm

yeah, looks like.

What do I have to change, please? Want to finish this...

How do I restart the progs btw.?

Thanks for this nice script!!!

URBANsUNITED

burbulence
Posts: 308
Joined: Sun Feb 17, 2013 10:00 pm

Re: HOW TO: NZBautomator for Entware-ng

Post by burbulence » Sun Mar 20, 2016 6:40 pm

change line 33 of S80NZBautomator from

Code: Select all

sabpkg=$(wget http://sabnzbd.org/download/ -O - | grep "Linux" | awk -F'"' '{print $2}' | awk -F'/download' '{print $1}')
to

Code: Select all

sabpkg=$(wget http://sabnzbd.org/download/ -O - | grep "Linux" | awk -F'"' '{print $2}' | awk -F'/download' '{print $2}')
let me know how that goes

to restart all you need to do is run the script again, that will restart all.


EDIT: the above changes have been made to the entware-ng branch on GitHub, above is no longer required
Last edited by burbulence on Sun Mar 20, 2016 10:00 pm, edited 1 time in total.

URBANsUNITED
Posts: 5
Joined: Sun Mar 20, 2016 11:11 am

Re: HOW TO: NZBautomator for Entware-ng

Post by URBANsUNITED » Sun Mar 20, 2016 6:53 pm

edit....

Code: Select all

wget http://sabnzbd.org/download/ -O -
+ awk -F" {print $2}
+ grep Linux
+ awk -F/download {print $2}
--2016-03-21 03:12:13--  http://sabnzbd.org/download/
Resolving sabnzbd.org... 104.18.40.215, 104.18.41.215, 2400:cb00:2048:1::6812:29d7, ...
Connecting to sabnzbd.org|104.18.40.215|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'STDOUT'

-                                                [ <=>                                                                                          ]  12.55K  --.-KB/s    in 0s

2016-03-21 03:12:13 (40.0 MB/s) - written to stdout [12849]

+ sabpkg=/1.0.0/SABnzbd-1.0.0-src.tar.gz
+ echo /1.0.0/SABnzbd-1.0.0-src.tar.gz
+ sed s/.*\(SAB.*\.gz\).*/\1/
+ sablcl=SABnzbd-1.0.0-src.tar.gz
+ printf SABnzbd
+ echo /1.0.0/SABnzbd-1.0.0-src.tar.gz
+ sed s/.*SABnzbd\(.*\)-.*/\1/
+ sabtmpdir=SABnzbd-1.0.0
+ cd /i-data/sysvol/admin
+ [ ! -d /opt/share/sabnzbd ]
+ [ 1 == 1 ]
+ [ 0 == 1 ]
+ [ 1 == 1 ]
+ [ ! -d /tmp/sabbackup ]
+ cd /tmp/sabbackup
+ [ SABnzbd-1.0.0-src.tar.gz != SABnzbd-1.0.0-src.tar.gz ]
+ [ ! -f /opt/share/sabnzbd/SABnzbd.py ]
+ wget /1.0.0/SABnzbd-1.0.0-src.tar.gz -O SABnzbd-1.0.0-src.tar.gz
/1.0.0/SABnzbd-1.0.0-src.tar.gz: Scheme missing.
+ tar xvzf SABnzbd-1.0.0-src.tar.gz
tar: short read
+ cp -ru SABnzbd-1.0.0/* /opt/share/sabnzbd
cp: invalid option -- 'u'
this is the real problem...

it can't fetch the archive

burbulence
Posts: 308
Joined: Sun Feb 17, 2013 10:00 pm

Re: HOW TO: NZBautomator for Entware-ng

Post by burbulence » Sun Mar 20, 2016 9:58 pm

OK I think its all good, download from GitHub and let me know how it goes. ive set the first start port of SABnzbd to 8085, you can change that to whatever port you want in the setup wizard I think, otherwise its a setting in the config.

Post Reply