No arguments to script on queue finishing
Posted: August 14th, 2010, 5:34 am
Hello,
I am trying to set up a script on finishing queue, but I have a problem with the arguments. It seems that no arguments are passed to the script. Here is the script :
Here is the result :
I am running sabnzbd version 0.5.3, from ubuntu 10.04 packages.
Any advice ?
I am trying to set up a script on finishing queue, but I have a problem with the arguments. It seems that no arguments are passed to the script. Here is the script :
Code: Select all
#!/bin/sh
echo
echo "Started as $0" > /tmp/notify_rabbit.txt
echo "Number of arguments : $#" >> /tmp/notify_rabbit.txt
echo "All arguments : $* " >> /tmp/notify_rabbit.txt
echo "And this arguments : $@ " >> /tmp/notify_rabbit.txt
echo "The first parameter (result-dir) =" "$1" >> /tmp/notify_rabbit.txt
echo "The second parameter (nzb-name) =" "$2" >> /tmp/notify_rabbit.txt
echo "The third parameter (nice name) =" "$3" >> /tmp/notify_rabbit.txt
echo "The fourth parameter (newzbin-id) =" "$4" >> /tmp/notify_rabbit.txt
echo "The fifth parameter (category) =" "$5" >> /tmp/notify_rabbit.txt
echo "The sixth parameter (group) =" "$6" >> /tmp/notify_rabbit.txt
echo "The seventh parameter (status) =" "$7" >> /tmp/notify_rabbit.txt
echo "Env : " >> /tmp/notify_rabbit.txt
env >> /tmp/notify_rabbit.txt
Code: Select all
Number of arguments : 0
All arguments :
And this arguments :
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) =
The seventh parameter (status) =
Env :
SUDO_GID=1000
MAIL=/var/mail/don
HOME=/home/don
DPKG_MAINTSCRIPT_ARCH=all
SUDO_UID=1000
LOGNAME=root
DPKG_RUNNING_VERSION=1.15.5.6ubuntu2
TERM=xterm-color
USERNAME=root
PATH=/sbin:/usr/sbin:/bin:/usr/bin
LANG=fr_FR
DPKG_MAINTSCRIPT_PACKAGE=sabnzbdplus
SUDO_COMMAND=/usr/bin/aptitude safe-upgrade
SHELL=/bin/bash
SUDO_USER=don
DPKG_NO_TSTP=yes
PWD=/usr/bin
Any advice ?