Post Processing on FreeNAS

Come up with a useful post-processing script? Share it here!
Post Reply
hrast
Newbie
Newbie
Posts: 7
Joined: November 9th, 2011, 3:45 pm

Post Processing on FreeNAS

Post by hrast »

I'm having a hell of a time trying to get any kind of post-processing script to work that uses the variables passed when the processing completes (http://wiki.sabnzbd.org/user-scripts). I've broken down as far as:

Code: Select all

#!/bin/sh
set DIR=$1
echo $1 >> /mnt/zfstest/usenet/logtest
And the only thing in the file, once the d/l completes, is a carriage return. Anyone come across this before? I'm trying to write a post script to run clamav against the directory. I tried another script that others say works under linux, but it also doesn't work.

*EDIT* Sabnzbd 0.6.10 on FreeNAS-7.2 (FreeBSD 7.3)
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Post Processing on FreeNAS

Post by shypike »

Have you tried another shell, like bash or ksh?
hrast
Newbie
Newbie
Posts: 7
Joined: November 9th, 2011, 3:45 pm

Re: Post Processing on FreeNAS

Post by hrast »

I've tried bash as well. Do the R/D/U tasks impact this? I have it Repair/Unpack/Delete the archives so all I'm left with in the completed directory is the output file.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Post Processing on FreeNAS

Post by shypike »

A successful verification is required.
But you'd notice that, it would show a "failed" in the history.
Looks like a platform vs. Python incompatibility.
hrast
Newbie
Newbie
Posts: 7
Joined: November 9th, 2011, 3:45 pm

Re: Post Processing on FreeNAS

Post by hrast »

I tried it last night on a straight FreeBSD 7-3 install, and had the exact same problem. Python 2.6.4, if I'm remembering correctly. Oh well.
User avatar
Mar2zz
Jr. Member
Jr. Member
Posts: 85
Joined: February 4th, 2011, 8:30 am
Contact:

Re: Post Processing on FreeNAS

Post by Mar2zz »

Maybe a problem with line-endings? Are you writing those scripts on a windows/mac perhaps?
hrast
Newbie
Newbie
Posts: 7
Joined: November 9th, 2011, 3:45 pm

Re: Post Processing on FreeNAS

Post by hrast »

Nope, I wrote all the scripts on the FreeBSD box. Interestingly, I tried this same thing yesterday with Ubuntu 11.10 Server and the Sabnzbd out of the repository linked in these forums and got the exact same problem.
hrast
Newbie
Newbie
Posts: 7
Joined: November 9th, 2011, 3:45 pm

Re: Post Processing on FreeNAS

Post by hrast »

I was selecting the script from the drop down on the Download -> Queues menu. I went and added the same script to the Default category, and its working now.

The UI design there is odd if that is how its supposed to work.
Post Reply