Hi,
I configured my SABnzbd+ 0.4.4 to use a script that contains the following :
echo "dollar1 : $1
dollar2 : $2
dollar3 : $3
dollar4 : $4
dollar5 : $5
dollar6 : $6" > /tmp/toto
And other commands. The script is launched (all my commands are executed) the file /tmp/toto is created, but it contains only :
dollar1 :
dollar2 :
dollar3 :
dollar4 :
dollar5 :
dollar6 :
So, it didn't get the variables from SABnzbd+
Is there something i do wrong, or i misunderstand ?
Thanks for you support
[LINUX] Troubles using post-processing scripts
-
- Newbie
- Posts: 10
- Joined: October 20th, 2008, 6:05 am
Re: [LINUX] Troubles using post-processing scripts
Have you tried the sample Sample-PostProc.sh shell script in the SABnzbd distribution?
Start from that.
Start from that.
Re: [LINUX] Troubles using post-processing scripts
Have you first tried to diagnose your script from a shell script ?
What happens if you use the sample script and add your >/tmp/toto to it?
What happens if you use the sample script and add your >/tmp/toto to it?
-
- Newbie
- Posts: 10
- Joined: October 20th, 2008, 6:05 am
Re: [LINUX] Troubles using post-processing scripts
doctor@stan:~$ sh .sabnzbd/scripts/Sample-PostProc.sh > toto
doctor@stan:~$ cat toto
Started as .sabnzbd/scripts/Sample-PostProc.sh
The first parameter (result-dir) =
The second parameter (nzb-name) =
The third parameter (nice name) =
The fourth parameter (newzbin-id) =
The fifth parameter (category) =
The sixth parameter (group) =
When i read .sabnzbd/scripts/Sample-PostProc.sh, i can understand it will echo the previous lines + the content of different variables ($1, $2...) those variables are the args in the cmdline :
doctor@stan:~$ sh .sabnzbd/scripts/Sample-PostProc.sh test1 test2 test3 test4 test5 test6 > toto
doctor@stan:~$ cat toto
Started as .sabnzbd/scripts/Sample-PostProc.sh
The first parameter (result-dir) = test1
The second parameter (nzb-name) = test2
The third parameter (nice name) = test3
The fourth parameter (newzbin-id) = test4
The fifth parameter (category) = test5
The sixth parameter (group) = test6
So, maybe i don't understand what those post processing scripts are supposed to do. My wish is to have a post processing script changing ownership of resulting dir.
Or maybe i need to know the way SABnzb+ is launching post procs scripts
doctor@stan:~$ cat toto
Started as .sabnzbd/scripts/Sample-PostProc.sh
The first parameter (result-dir) =
The second parameter (nzb-name) =
The third parameter (nice name) =
The fourth parameter (newzbin-id) =
The fifth parameter (category) =
The sixth parameter (group) =
When i read .sabnzbd/scripts/Sample-PostProc.sh, i can understand it will echo the previous lines + the content of different variables ($1, $2...) those variables are the args in the cmdline :
doctor@stan:~$ sh .sabnzbd/scripts/Sample-PostProc.sh test1 test2 test3 test4 test5 test6 > toto
doctor@stan:~$ cat toto
Started as .sabnzbd/scripts/Sample-PostProc.sh
The first parameter (result-dir) = test1
The second parameter (nzb-name) = test2
The third parameter (nice name) = test3
The fourth parameter (newzbin-id) = test4
The fifth parameter (category) = test5
The sixth parameter (group) = test6
So, maybe i don't understand what those post processing scripts are supposed to do. My wish is to have a post processing script changing ownership of resulting dir.
Or maybe i need to know the way SABnzb+ is launching post procs scripts
Re: [LINUX] Troubles using post-processing scripts
doctor madness wrote: My wish is to have a post processing script changing ownership of resulting dir.
Code: Select all
#!/bin/sh
chown -R NEWUSER "$1"
-
- Newbie
- Posts: 10
- Joined: October 20th, 2008, 6:05 am
Re: [LINUX] Troubles using post-processing scripts
i did this in my "final" script :
#!/bin/sh
FINAL_DIR=$1
chmod 2770 $FINAL_DIR
exit 0
But i always have an error telling me :
chmod: opérande manquante après `2770' (missing operator after 2770)
#!/bin/sh
FINAL_DIR=$1
chmod 2770 $FINAL_DIR
exit 0
But i always have an error telling me :
chmod: opérande manquante après `2770' (missing operator after 2770)
Re: [LINUX] Troubles using post-processing scripts
There's definitely something fishy with your system or with the way you installed SABnzbd.
Have you tried alternative shells?
#!/bin/bash
#!/bin/ksh
What kind of Lnux system do you have?
Have you tried alternative shells?
#!/bin/bash
#!/bin/ksh
What kind of Lnux system do you have?
-
- Newbie
- Posts: 10
- Joined: October 20th, 2008, 6:05 am
Re: [LINUX] Troubles using post-processing scripts
i'm using debian etch, i tried with /bin/sh and /bin/bash
i configured for use with ksh, and i'll see what happens
about my SABnzbd installation, i just downloaded the dir from your website, then started it with my user (!=root), with this cmdline :
python /usr/local/SABnzbd/SABnzbd.py -f /home/doctor/.sabnzbd/sabnzbd.ini -s localhost:3423 -d
anything wrong with it ?
i configured for use with ksh, and i'll see what happens
about my SABnzbd installation, i just downloaded the dir from your website, then started it with my user (!=root), with this cmdline :
python /usr/local/SABnzbd/SABnzbd.py -f /home/doctor/.sabnzbd/sabnzbd.ini -s localhost:3423 -d
anything wrong with it ?
Re: [LINUX] Troubles using post-processing scripts
Looks all OK.
What does the logging file show (you may need to set the logging level to "debug").
What does the logging file show (you may need to set the logging level to "debug").
-
- Newbie
- Posts: 10
- Joined: October 20th, 2008, 6:05 am
Re: [LINUX] Troubles using post-processing scripts
in logs i've that line :
2008-11-03 15:40:19,765::INFO::[newsunpack] Running external script /home/doctor/.sabnzbd/scripts/postproc-defaults.sh(/home/ftp/warez/nzb/doctor/pm5.ga.s05e05.vostfr.nfo, pm5.ga.s05e05.vostfr.nfo.nzb, pm5.ga.s05e05.vostfr.nfo, , doctor, alt.binaries.gougouland)
Is it normal ? Are those values the variables sent to sabnzbd ?
EDIT : I'm idiot I forgot to forward my variables from one script to another... i corrected it, and it's ok
2008-11-03 15:40:19,765::INFO::[newsunpack] Running external script /home/doctor/.sabnzbd/scripts/postproc-defaults.sh(/home/ftp/warez/nzb/doctor/pm5.ga.s05e05.vostfr.nfo, pm5.ga.s05e05.vostfr.nfo.nzb, pm5.ga.s05e05.vostfr.nfo, , doctor, alt.binaries.gougouland)
Is it normal ? Are those values the variables sent to sabnzbd ?
EDIT : I'm idiot I forgot to forward my variables from one script to another... i corrected it, and it's ok
Last edited by doctor madness on November 3rd, 2008, 9:56 am, edited 1 time in total.