Help with nzbget-housekeeper

Get help, report and discuss bugs.
niours
Posts: 6
Joined: 30 Oct 2008, 19:45
Location: Paris, France

Help with nzbget-housekeeper

Post by niours » 30 Oct 2008, 22:14

Hi every one,

I'm trying to use ydrol postprocessing script nzbget-housekeeper but can't make it work.

The only thing written in my log file is :
Thu Oct 30 23:13:42 2008 INFO Executing post-process-script for xxxx
Thu Oct 30 23:13:42 2008 INFO MERGE_UNPAK_SETTINGS [/usr/local/bin/unpak.cfg]
Thu Oct 30 23:13:43 2008 INFO Completed post-process-script for xxxx

You could say "1 second unraring, wow !" :) ... but it did nothing :p
I double checked my unpak.cfg file and tried to understand unpak.sh but i'm not good enough to find the source of my problem.

Can someone help me ?

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Help with nzbget-housekeeper

Post by hugbug » 30 Oct 2008, 22:34

Not sure if I can help, cause I do not use the script myself. But ydrol will definitely ask for more info :-):
  • script version;
  • your hardware and OS;
  • post your config for review here;
  • did the script created a log file? If so, post it here also.
There is a stable and testing versions of the script. Did you tried both?

niours
Posts: 6
Joined: 30 Oct 2008, 19:45
Location: Paris, France

Re: Help with nzbget-housekeeper

Post by niours » 31 Oct 2008, 19:29

Sorry for that !

I'm using the last stable version of the script (20080911-01) on a NSLU2 NAS device with Debian.
The script doesn't seem to create its own log file. But it writes into the nzbget.log file (the second line of log from my first post is written by nzbget-housekeeper I guess).
I also tried to set unpak_debug_mode to 1 but it doesn't change any thing.

Is this script written for a specific shell ?
I don't know which one is installed and active on my device. Do you know how to find that information ?

Damien

niours
Posts: 6
Joined: 30 Oct 2008, 19:45
Location: Paris, France

Re: Help with nzbget-housekeeper

Post by niours » 04 Nov 2008, 13:40

I've found the source of my first problem.
unpak uses two awk functions (sysdate and strftime) which are not implemented in every awk version.
My nslu2 debian install comes with mawk and doesn't have them.

So to anyone concerned, gawk appears to be a prerequisite.
Next step : try the beta version to see if it resolves the others problems

Damien

niours
Posts: 6
Joined: 30 Oct 2008, 19:45
Location: Paris, France

Re: Help with nzbget-housekeeper

Post by niours » 06 Nov 2008, 01:04

This function (from unpak.sh) generates an error :

RE_ESCAPE_FOR_SED() {
sed 's/\([][.*/\]\)/\\\1/g'
}

I don't understand what it does so i can't find out what's wrong with it.
Any idea ?
Could it be something wrong with my version of sed like it was for awk (mawk vs gawk) ?

Damien

doctorvangogh
Posts: 21
Joined: 29 Oct 2008, 01:03
Location: Germany (NRW)

Re: Help with nzbget-housekeeper

Post by doctorvangogh » 08 Nov 2008, 10:52

niours wrote:This function (from unpak.sh) generates an error :

RE_ESCAPE_FOR_SED() {
sed 's/\([][.*/\]\)/\\\1/g'
}

I don't understand what it does so i can't find out what's wrong with it.
Any idea ?
Could it be something wrong with my version of sed like it was for awk (mawk vs gawk) ?

Damien
Well, since I'm trying to run unpak.sh on a NSLU2 with Debian as well, I've run into the exact same problem. Seems sed chokes on the expression you quoted (and another) from the script.

Here's my fix - you need to slightly alter two definitions in the script: (notice one "[" has moved from the left of the "." to the right)

Code: Select all

...
#Add '\' to regular expression metacharacters in a string.
#Required so we can search for the string whilst using regualr expressions.
# eg grep "^$string$". this will fail if string contains '[].* etc.
RE_ESCAPE_FOR_SED() {
    sed 's/\([].[*/\]\)/\\\1/g'
}

# Same as RE_ESCAPE_FOR_SED but (|) are also meta characters.
RE_ESCAPE_FOR_GREP() {
    sed 's/\([].[*/\(|)]\)/\\\1/g'
}
...
Seems the debian/nslu2's sed doesn't like BRE matches containing "][", so by just splitting the brackets up, things should work.

As for what it does: If you're interested, look up the s/regexp/replacement/ command in sed's manpage.

niours
Posts: 6
Joined: 30 Oct 2008, 19:45
Location: Paris, France

Re: Help with nzbget-housekeeper

Post by niours » 08 Nov 2008, 15:23

Thanks for your answer Doc !
I was going to post the same solution when i read your message :)

I still have some problems with unpak though. I had to comment the line 1352 : cat=$(NMT_SUBSTITUTE_PIN_FOLDER "$cat") which made the script stop withot any error. (Maybe it's related to the fact that i did not set the unpak_nmt_pin_root variable)

I also had to chmod o+r nzbget.conf for unpak to read it (even if nzbget is launched as a daemon).

I'm still working on it, i'll post any thing new i can find to help.
Could you send me your version of the script if you modified anything (and if it works) ?u

Damien

doctorvangogh
Posts: 21
Joined: 29 Oct 2008, 01:03
Location: Germany (NRW)

Re: Help with nzbget-housekeeper

Post by doctorvangogh » 08 Nov 2008, 20:00

I only made the one change I posted here. As for 'sending' you my script, that's kinda difficult right now. I might have bricked my slug while playing around with the kernel for ipv6 support ;)

Regarding the 'pin' feature causing a premature exit, I remember that I also modified the .conf file and commented out some auto categorization entries (don't remember the name, but there were 3 lines and they were called some_thing_1, some_thing_2 & some_thing_3).

doctorvangogh
Posts: 21
Joined: 29 Oct 2008, 01:03
Location: Germany (NRW)

Re: Help with nzbget-housekeeper

Post by doctorvangogh » 11 Nov 2008, 17:49

Well, my slug is back in action and here is my working script.

The tv auto categorization still somewhat screws things up "Foo 2008 s01e17" get's recognized as "Foo 208/Season 1", but it's working in general ;)
Attachments
unpak.zip
working unpack.sh + unpack.cfg on my nslu2
(27.75 KiB) Downloaded 182 times

niours
Posts: 6
Joined: 30 Oct 2008, 19:45
Location: Paris, France

Re: Help with nzbget-housekeeper

Post by niours » 12 Nov 2008, 12:23

Thanks a lot, i'll try it.

Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests