Page 1 of 1

Script never detected as being complete

Posted: July 24th, 2009, 2:03 pm
by Clay
Version: 0.4.11
OS: FreeNAS 0.7 (FreeBSD 7.2)

I've got a problem in 0.4.11 with scripts never being detected as being complete.

I've got an RSS feed w/ a script assigned to it. Everything downloads fine, unpacks, verifies, deletes and then kicks off the script.

It runs (I guess) but is stuck in [USER-SCRIPT]: => Running user script

It's a bash script that calls another shell script, which kicks off a java app (Yet Another Movie Jukebox)

Any ideas on how I could trouble shoot this? I think it's specific to this one script unfortunately, but it was work then about a week ago it stopped working, though no changes were made to it.


Oh this reminds me of something - can the "move the nzb to ./backup" be done *after* something has been completely processed? To fix my current problem, not only do I have to clear out the cache directory, but I have to hunt down and delete the backup entries representing stuff that has been queued up but never downloaded or processed.

Re: Script never detected as being complete

Posted: July 25th, 2009, 4:55 am
by shypike
Have you tested the script "stand-alone"?
From a command shell, passing it the same parameters as SABnzbd would do.
(You can see in the logfile what the exact parameters are).

Re: Script never detected as being complete

Posted: July 25th, 2009, 7:43 am
by Clay
The script runs fine standalone, and doesn't require any options/parameters

Re: Script never detected as being complete

Posted: July 25th, 2009, 4:28 pm
by shypike
So how does it know where the downloaded data is?

Re: Script never detected as being complete

Posted: July 26th, 2009, 9:59 am
by Clay
It doesn't do anything specifically to the downloaded data.

The script (YAMJ) generates a bunch of html of my entire media library, which is then read by my Popcorn Hour box.

Anyway, the way it works is that the downloaded data gets dumped under a certain path, and then the YAMJ generator scans everything at the top of that certain path.

This worked perfectly for like 5 months and now just works intermittently.

Amusingly enough, I've got another script that is occasionally run which does take parameters and does a bunch of crazy scripting and can take like an hour to run (it's converting stuff to iphone format) runs perfectly fine.

Re: Script never detected as being complete

Posted: July 28th, 2009, 8:34 am
by Clay
No ideas? Is there any logging I could turn on to get some better info?

This is really frustrating :(

Re: Script never detected as being complete

Posted: July 28th, 2009, 11:14 am
by shypike
A bit hard for us to say anything sensible about this.
SABnzbd lets the OS start the script and waits for it to exit.
That's about it.

The only thing I can think of is experimenting with the nice and ionice parameters.
Clear the parameters in Config->Switches so they are not used anymore.
Does the script start with a proper "shebang", like #!/bin/bash, so that
the proper shell is used?

Re: Script never detected as being complete

Posted: August 3rd, 2009, 4:47 pm
by Clay
The script that sabnzbd calls uses #!/bin/bash, as does the script that it calls.

I've noticed it only happens on TV shows; I 7 movies through it and everything was just dandy. It pulled a TV show via RSS and it never detected the end.

I've non-TV shows that are pulled via RSS and run through a different script and it has never had a problem.

This is quite perplexing...

Re: Script never detected as being complete

Posted: August 4th, 2009, 3:00 am
by shypike
What happens of you disable the TV season sorting features?

Re: Script never detected as being complete

Posted: August 4th, 2009, 9:54 am
by Clay
When I turned off the sorting, everything worked. I ran about 5 shows through it.

Re: Script never detected as being complete

Posted: August 5th, 2009, 2:44 am
by shypike
The parameters passed to the script are a bit different when TV sorting kicks in.
Unfortunately I don't know the details.
Try PM-ing switch with the details of your problem.