If you look closely to Raspbian torrent file URL, you would find out it's not an exactly file name, but something like "raspbian_lastest". This means even an upgraded torrent file is available, the URL is not changed.
So, you could add a cron job for daily upgrade like: transmission-remote add "the URL"
(I can't tell the exact commandline for it, I don't have transmission on my phone)
EDIT:
I'm home now.
I mean, add a new script at
/etc/cron.daily with:
Code: Select all
#!/bin/sh
/usr/local/bin/transmission-remote 12345 --add "https://downloads.raspberrypi.org/raspbian_latest.torrent" --download-dir "/home/pi/Downloads/seeding"
/usr/local/bin/transmission-remote 12345 --add "https://downloads.raspberrypi.org/raspbian_lite_latest.torrent" --download-dir "/home/pi/Downloads/seeding"
/usr/local/bin/transmission-remote 12345 --add "https://downloads.raspberrypi.org/NOOBS_latest.torrent" --download-dir "/home/pi/Downloads/seeding"
/usr/local/bin/transmission-remote 12345 --add "https://downloads.raspberrypi.org/NOOBS_lite_latest.torrent" --download-dir "/home/pi/Downloads/seeding"
exit 0
The "12345" is the Transmission control port number.
Don't forget to give the script execution privilege with
sudo chmod ugo+x script.sh
So everyday, at about 6:25 AM, Pi would automatically check if there is a new image online, if there is, it would download it and join the torrent network.
The problem is that it would only add new torrent, and won't delete old one. So maybe half a year, you might need to delete the old image manually.