Posts: 23
Joined: Tue Jan 29, 2013 8:25 am

New downloads - Announcement

Thu Jul 20, 2017 12:42 pm

Have a Pi Zero W as bit torrent server serving up raspbian full and lite. I have learnt that when the uploads go to nil, that an updated distro is available.
Just wonder if there is an announce mechanism for when updated distros are available? If so, how do I access it?


User avatar
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: New downloads - Announcement

Thu Jul 20, 2017 12:58 pm

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)

I'm home now.

I mean, add a new script at /etc/cron.daily with:

Code: Select all


/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.

Return to “General discussion”