Pomoc External Script can't be used ?

Haskell

Passing Basics
Beginner
11 Kwiecień 2019
11
1
3
34
QNAP
TS-x53
Ethernet
10 GbE
In Settings, under Notifications, there's an option to use External Script, but it's not checkable :-/

acldup.com_KROPU3UyYh.png


Firmware version: 4.3.6.0895
Model name: QNAP TS-253Be
 
Should be in RC2.
Hey Man!

Please expect file structure in RC2 build of rtorrent-Pro.

/share/Rdownload/sh-script/_event.download.finished
Bash:
#!/bin/sh

# rTorrent event script handler
#
# Script launcher. DO NOT MODIFY!
#
# Usage:
# a) In the directory: /share/Rdownload/sh-script
#    create file named: finished-*.sh
#
#    (eg. finished-sendmail.sh)
#
# b) set executables permissions:
#    # chmod a+x -R /share/Rdownload/sh-script/*.sh
#

DIR="/share/Rdownload/sh-script"
FILES="${DIR}/finished*.sh"

if [ ! -d "$DIR" ]; then
	echo "Directory $DIR not exist."
	exit 0
fi

if [ -z "$3" ]; then
	cat <<-EOF
Missing arguments. Syntax:
# $(basename $0) <hash> <name> <path> [label]

Arguments:
hash	- torrent infohash
name	- torrent name
path	- torrent data path

Optional arguments:
label	- torrent label
EOF
	exit 0
fi

# Call custom handler scripts
for i in $FILES
do
	echo Execute: $i $@
	test ! -x "$i" || "$i" "$@" >> $DIR/log
done

# important status exit otherwise will break other executions
exit 0
 
RC2 is available from now.

External script:
upload_2019-4-30_9-31-57.png


Here are steps to manually execute own post download bash scripts:
  1. Do not remove or delete /share/Rdownload/sh-script/_event.download.finished.

  2. Create under /share/Rdownload/sh-script/ file: finished-example.sh
    Bash:
    #!/bin/sh
    
    echo "Hello from $(basename $0) $@"
    
    exit 0

    Where:
    $1 - torrent hash
    $2 - torrent name
    $3 - torrent path
    $4 - torrent label

  3. Set executables permissions:
    Bash:
    chmod a+x /share/Rdownload/sh-script/finished-example.sh