Last active
July 10, 2018 12:18
-
-
Save gronono/cd866a9a56dd92860226818608d5b129 to your computer and use it in GitHub Desktop.
Permet de changer le tracker des torrents sur le Synology
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Pensez à s'ajouter dans la whitelist pour le contrôle distant sur le NAS | |
# vi /usr/syno/etc/packages/DownloadStation/download/settings.json | |
# ps w | grep transmission | |
# kill -HUP <pid> | |
REMOTE="192.168.1.2:9093" | |
ANNOUNCE="https://tracker.t411.al/<tracker-key>/announce" | |
echo "Recuperation des torrents" | |
ids=$(transmission-remote $REMOTE --list | sed 's/ *\([0-9]\+\).*/\1/g' | tail -n +2 | head -n -1) | |
echo $ids | |
echo "Changement du tracker" | |
for id in $ids | |
do | |
echo $id | |
transmission-remote $REMOTE -t $id --tracker-remove 0 > /dev/null | |
transmission-remote $REMOTE -t $id --tracker-add $ANNOUNCE > /dev/null | |
transmission-remote $REMOTE -t $id --info-trackers | grep "tracker" | |
transmission-remote $REMOTE -t $id --reannounce | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment