I have OMV3 running on Armbian, and I found this to remove my completed downloads:
Transmission remove downloaded torrents
Zitatnano /usr/local/bin/transmission_script.sh
chmod +x/usr/local/bin/transmission_script.sh
I did exactly that, removed the auth part since I do not have to authentication (I pasted using nano)
#!/bin/sh
TORRENTLIST=`transmission-remote --list | sed -e '1d;$d;s/^ *//' | cut --only-delimited --delimiter=' ' --fields=1`
for TORRENTID in $TORRENTLIST
do
echo "* * * * * Operations on torrent ID $TORRENTID starting. * * * * *"
DL_COMPLETED=`transmission-remote --torrent $TORRENTID --info | grep "Percent Done: 100%"`
if [ "$DL_COMPLETED" != "" ]; then
echo "Torrent #$TORRENTID is completed."
echo "Removing torrent from list."
transmission-remote --torrent $TORRENTID --remove
else
echo "Torrent #$TORRENTID is not completed. Ignoring."
fi
echo "* * * * * Operations on torrent ID $TORRENTID completed. * * * * *"
done
Alles anzeigen
In desperation I also did chmod -R 777 onto my downloads directory and into that file, but nothing works, I get "Unexpected response" with a buch of "invalid characters". I've tried running the script both through SSH and shell in a box, both with bash script.sh and ./script.sh. Nothing works
EDIT: In the meantime I managed to run the script with sh script.sh. Problem is, I have some debug echos in the script and it does not go into the "for loop", so it seems it doesn't find any torrents. I currently have three on "seeding complete".
Any idea?