Files
Server-scripts/quiethost/magnet_launcher
T
2026-09-14 12:43:38 +02:00

11 lines
352 B
Bash
Executable File

#!/bin/bash
ssh serverhost sudo /home/lucas/scripts/deluge_user_cmd.sh deluge-console add "$1" > /home/lucas/.LOG/torrentlog.log 2>&1
if [ $(cat /home/lucas/.LOG/torrentlog.log | grep -o "Torrent added!" | wc -l) -gt 0 ]; then
notify-send 'Add Magnet' 'Success'
else
notify-send 'Add Magnet' 'FAIL -> Copy to Clipboard'
echo "$1" | xclip
fi
exit