newznab + unRAID integration?


Recommended Posts

  • Replies 254
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Ok, new issue. Since my memory of command line strings is limited I need to know how I get to the update scripts to run that are installed on my Cache drive. I am sure there is a simple way, I just can't seem to find it via search.

 

the files are located at: /cache/appdata/webroot/newznab/misc/update_scripts

 

How to I get there via screen?

Link to comment

 

php /mnt/cache/appdata/webroot/newznab/misc/update_scripts/update_binaries.php

php /mnt/cache/appdata/webroot/newznab/misc/update_scripts/update_releases.php

 

Joeman, sorry, been so busy trying to get everything set up, I haven't even finished completely setting it up for myself. Its pulling everything, I just haven't set the api up for sickbeard yet!

Link to comment

 

php /mnt/cache/appdata/webroot/newznab/misc/update_scripts/update_binaries.php

php /mnt/cache/appdata/webroot/newznab/misc/update_scripts/update_releases.php

 

 

Ran that command string and no errors but nothing happened. I assume that I should see something in the window that lets me know it's working?

 

I also tried to use the nix scripts but it gives the the following error when I run the script: line 16:/usr/bin/php5: No Such file or dir

 

Thoughts?

 

 

Link to comment

Ok, new issue. Since my memory of command line strings is limited I need to know how I get to the update scripts to run that are installed on my Cache drive. I am sure there is a simple way, I just can't seem to find it via search.

 

the files are located at: /cache/appdata/webroot/newznab/misc/update_scripts

 

How to I get there via screen?

 

I am CL impaired also.

try cd /mnt/cache/appdata/webroot/newznab/misc/update_scripts

Then just just php update_binaries.php

After it runs php update_releases.php

 

Link to comment

I finally got everything set up last night, but am now running into a problem: When I go to the 'nix_scripts' folder and try to execute ./newznab.sh start I get this error: -bash: ./newznab.sh: /bin/sh^M: bad interpreter: No such file or directory

 

No idea what to do? Last night, I used the scripts that come with the free version (cron_scripts) and it seemed to work. This morning, I deleted the folder from the free version and used the above but encountered the error.

 

Anyone have any idea? Thanks a lot.

Link to comment

Frustrating problem with Sickbeard. I got newznab runing and tried to set it in SB.

When I type http://tower:81 and save. I changes the : to a / and it wont connect.

 

I trice to edit the url in config.ini, and the result was the same. Also I wont accept a Ip addess in the field.

 

Just a query - by all accounts Sickbeard is pretty much unaffected by the death of nzbmatrix, since it works fine using its own indexing sources (womble?). Is there a reason to use newznab for sickbeard? (I understand that "because it's there" may be a good enough reason, just wondering that's all ;) )

Link to comment

I finally got everything set up last night, but am now running into a problem: When I go to the 'nix_scripts' folder and try to execute ./newznab.sh start I get this error: -bash: ./newznab.sh: /bin/sh^M: bad interpreter: No such file or directory

 

No idea what to do? Last night, I used the scripts that come with the free version (cron_scripts) and it seemed to work. This morning, I deleted the folder from the free version and used the above but encountered the error.

 

Anyone have any idea? Thanks a lot.

 

I received a similar error when trying to execute another script (was one I modified in Notepad++ to backfill without bloating the db).

 

Fixed the error by running dos2unix. Usually not needed when I use Notepad++, but somehow I didn't save it correctly & it got CR/LF in it (causing "/bin/sh^M: bad interpreter: No such file or directory" error).

 

Here is a link with various ways to remove ^M from nix files: http://www.computing.net/answers/unix/remove-m-and-line-feeds/6934.html

Link to comment

Thanks for these suggestions - I tried running

 

tr -d '\015' newznab.sh

sed 's/'"$(printf '\015')"'$//g' newznab.sh

 

but the error is still there. Can I somehow open the file in TextPad and get rid of the problem? However, searching for '^M' in textpad doesn't show anything...

 

I think those are just outputting to the screen.  To save the changes try adding "> NewFileName.sh". For example

 sed 's/'"$(printf '\015')"'$//g' newznab.sh > newznab1.sh

Then see if running newznab1.sh works for you.

Link to comment

I finally removed all offending ^M entries (after each line) manually, but now ran into a new error  :(

 

./newznab.sh: line 18: tput: command not found

./newznab.sh: line 19: tput: command not found

./newznab.sh: line 20: tput: command not found

 

These lines contain

 

RED=$(tput setaf 1)

GREEN=$(tput setaf 2)

NORMAL=$(tput sgr0)

 

No idea what's going on here - I changed the path just like I did in the other file - this one doesn't seem to work... Should I go back to the other one (from the free version)? Although this one seems to be doing more - if it worked...

Link to comment
The Usenet Providers purge stuff after 1,000+ days or so. As we get further and further away from now, they won't be retaining a lot of stuff that is useful.

This is completely wrong. No major usenet provider is expiring articles. Every day that passes, they add a day of retention. They're just adding more hard drives every day.

GigaNews is closing in on 1600 days of retention at the moment. I pulled down a large 1400 day old post last week.

Link to comment

I finally removed all offending ^M entries (after each line) manually, but now ran into a new error  :(

 

./newznab.sh: line 18: tput: command not found

./newznab.sh: line 19: tput: command not found

./newznab.sh: line 20: tput: command not found

 

These lines contain

 

RED=$(tput setaf 1)

GREEN=$(tput setaf 2)

NORMAL=$(tput sgr0)

 

No idea what's going on here - I changed the path just like I did in the other file - this one doesn't seem to work... Should I go back to the other one (from the free version)? Although this one seems to be doing more - if it worked...

 

newznab.sh in nix_script has commands to color format the output.. which is not really necessary.. and doesn't work with unraid

i've been testing with some scripts and found out newznab.sh in nix_script doesnt really work for unraid.

 

I would download the free version and use the one in cron_script for now.

Link to comment

I get bad interpreter: no such file or directory when running the following:

 

from within the cron_scripts directory in the /update_scripts folder

 

./newznab.sh start

 

I get the above error..  Thoughts?

 

 

 

running

./newznab.sh start

should be enough to run update every 10 mins..

 

This will run the update_binaries & update_releases every 10 mins without need to setup a cron job?

 

Yep, you just need to change NEWZNAB_PATH in that file though. If you need to run it faster than every 10 mins, you can change NEWZNAB_SLEEP_TIME to less than 600. That's in seconds.

 

If you open up newznab.sh file, you will see what's going on.

 

It just uses While loop to go on and on until it stops.

 

This can probably be added to go file to run it everytime it boots, but i wonder what would be the best way to stop it when the array stops..

 

but that newznab.sh file should be good to use for now.

Link to comment

running

./newznab.sh start

should be enough to run update every 10 mins..

 

This will run the update_binaries & update_releases every 10 mins without need to setup a cron job?

 

Yep, you just need to change NEWZNAB_PATH in that file though. If you need to run it faster than every 10 mins, you can change NEWZNAB_SLEEP_TIME to less than 600. That's in seconds.

 

If you open up newznab.sh file, you will see what's going on.

 

It just uses While loop to go on and on until it stops.

 

This can probably be added to go file to run it everytime it boots, but i wonder what would be the best way to stop it when the array stops..

 

but that newznab.sh file should be good to use for now.

 

@jangjong:

 

I tried this last night - it appeared to have run once but then didn't update again.  (Left configured at 600 seconds)

 

I then killed the process and used @influencer's cron script to load the newznab.sh script on a frequent basis, which caused another update but again hasn't updated the binaries in 10 hours. 

 

The process still appears to be active.  This line is listed in my active processes:

763 root      20   0  2564  656  520 S    0  0.0   0:00.00 newznab.sh  

'

 

I also (unsurprisingly) found the PID file in /var/run/

 

This error is getting thrown out to the syslog every time the cron runs:

Dec 14 08:30:01 Tower crond[1392]: exit status 1 from user root /mnt/cache/.custom/www/newznab/misc/update_scripts/cron_scripts/newznab.sh start > /dev/null

 

I want it to run every 15 minutes and pull down and process the fresh binaries.  Do you have any ideas what is going wrong here?

 

Thank you very much!!

Chris

Link to comment

christuf,

 

newznab.sh under cron_script is actually not meant for cron jobs.. not sure why they call it cron_scripts. so it won't work with influence's cron script as i mentioned earlier.

 

you just have to run it after changing the path.

 

newznab.sh may not delete the pid file though... kill is suppsoed to delete that pid file but it doesn't really work sometimes.

 

one thing i want to ask you though, was your sabnzbd active at all? in order for newznab to update, i found out that it needs connection with the usenet server.

so for example, if your usenet server offer 30 connection and you have set up 30 connection in sabnzbd , and your sabnzbd was actively downloading something, newznab wont be able to get that connection it needs..

what i did was my usenet server offers like 50 connection, so i lowered it to 30 in sabnzbd so there will always be connection available for newznab script.

 

if this is not a problem, i would check the basic. are you able to run update_binary and update_release fine?

 

another thing i want to ask is how are you checking if it updated or not?

Link to comment

christuf,

 

newznab.sh under cron_script is actually not meant for cron jobs.. not sure why they call it cron_scripts. so it won't work with influence's cron script as i mentioned earlier.

 

you just have to run it after changing the path.

 

newznab.sh may not delete the pid file though... kill is suppsoed to delete that pid file but it doesn't really work sometimes.

 

one thing i want to ask you though, was your sabnzbd active at all? in order for newznab to update, i found out that it needs connection with the usenet server.

so for example, if your usenet server offer 30 connection and you have set up 30 connection in sabnzbd , and your sabnzbd was actively downloading something, newznab wont be able to get that connection it needs..

what i did was my usenet server offers like 50 connection, so i lowered it to 30 in sabnzbd so there will always be connection available for newznab script.

 

if this is not a problem, i would check the basic. are you able to run update_binary and update_release fine?

 

another thing i want to ask is how are you checking if it updated or not?

 

Thank you jangjong for the response. 

 

OK - understand re: cronning the job.  Have taken it out of my cron queue.

 

I'm actually using a different usenet server to avoid these problems... so not sure what is going on.  Yes - I can run those files perfectly though the command line. 

 

I've switched over to using the newzbnzb_screen.sh command.  Seems to do the same thing, but displays the output verbosely.  I don't mind tying up one of my screens with this command, so guess I'll just live with this for the time being.  Pity as the other file was much cleaner.

 

You can check the last update of each of the groups by going to the newznab homepage and clicking on "Groups".  It lists each of the activated groups and shows the time of last update [This is from memory, so please excuse any mistakes]

 

 

Link to comment

christuf,

 

newznab.sh under cron_script is actually not meant for cron jobs.. not sure why they call it cron_scripts. so it won't work with influence's cron script as i mentioned earlier.

 

you just have to run it after changing the path.

 

newznab.sh may not delete the pid file though... kill is suppsoed to delete that pid file but it doesn't really work sometimes.

 

one thing i want to ask you though, was your sabnzbd active at all? in order for newznab to update, i found out that it needs connection with the usenet server.

so for example, if your usenet server offer 30 connection and you have set up 30 connection in sabnzbd , and your sabnzbd was actively downloading something, newznab wont be able to get that connection it needs..

what i did was my usenet server offers like 50 connection, so i lowered it to 30 in sabnzbd so there will always be connection available for newznab script.

 

if this is not a problem, i would check the basic. are you able to run update_binary and update_release fine?

 

another thing i want to ask is how are you checking if it updated or not?

 

Thank you jangjong for the response. 

 

OK - understand re: cronning the job.  Have taken it out of my cron queue.

 

I'm actually using a different usenet server to avoid these problems... so not sure what is going on.  Yes - I can run those files perfectly though the command line. 

 

I've switched over to using the newzbnzb_screen.sh command.  Seems to do the same thing, but displays the output verbosely.  I don't mind tying up one of my screens with this command, so guess I'll just live with this for the time being.  Pity as the other file was much cleaner.

 

You can check the last update of each of the groups by going to the newznab homepage and clicking on "Groups".  It lists each of the activated groups and shows the time of last update [This is from memory, so please excuse any mistakes]

 

screen.sh should work fine too.

but honestly, i dont know if that 'last update' is showing when the script updated the group.

 

i have a few groups enabled, but some of them show like 10 hours, and some of them show 15 mins.

or i have another group that has 33weeks in there. lol

 

so im' pretty sure it means the last time the group itself got updated in the server.. nothing wrong with your script in my opinion.

Link to comment

I think it does, because when I then manually run the update_binaries.php script, the dates (for the majority) refresh to 1 minute.

 

I have one group with an old date, but then again it has only 1 release.  So in general I agree, but for active groups I think that this is a pretty reliable measure.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.