Execute plugin not working
Posted: Sun Feb 02, 2020 5:18 pm
I've looked at all the simple things and I haven't been able to find out why this isn't working:
The three lines are respectively:
Nothing happens when I add a torrent or upon torrent completion. Nothing is added to the log and notify-send doesn't pop a notification on my desktop (but it does when I manually test it as above).
What am I missing?
Code: Select all
$ deluged --version
deluged 2.0.3-2-201906121747-ubuntu18.04.1
libtorrent: 1.1.5.0
Python: 3.6.9
OS: Linux 5.3.0-28-generic
$ deluge-gtk --version
deluge-gtk 2.0.3-2-201906121747-ubuntu18.04.1
libtorrent: 1.1.5.0
Python: 3.6.9
OS: Linux 5.3.0-28-generic
$ which torrent-complete
/usr/local/bin/torrent-complete
$ ll /usr/local/bin/torrent-complete
-rwxr-xr-x 1 root root 1092 Feb 2 11:35 /usr/local/bin/torrent-complete*
$ pwd
/library/music/00-incoming/deluged-incoming
$ cat /usr/local/bin/torrent-complete
#!/bin/bash
export DISPLAY=:0
# Input Parameters
torrentid="$1"
torrentname="$2"
torrentpath="$3"
torrentfilepath="$3/$2"
echo "Torrent Details: " "$torrentname" "$torrentpath" "$torrentid" >> /dev/shm/cache/torrent-complete.log
notify-send "Deluge:" "A trrent has completed, proceeding to execute script."
if [[ $torrentpath == "/library/music/00-incoming/deluged-incoming" ]] ; then
notify-send "Deluge:" "A music torrent has completed. Attempting to launch picard."
picard /library/music/00-incoming/deluge-incoming
else
:
fi
$ torrent-complete id name path
$ cat /dev/shm/cache/torrent-complete.log
Torrent Details: name path id
The three lines are respectively:
Code: Select all
/usr/local/bin/torrent-complete
/usr/bin/notify-send "torrent completed" "$2"
/usr/bin/notify-send "Torrent added:" "$2"
What am I missing?