Files
Server-scripts/quiethost/magnet_launcher
T

10 lines
352 B
Bash
Raw Normal View History

2026-04-14 23:55:46 +02:00
#!/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