Zsync Ubuntu ISOs to apt server
Posted by gregster on 17 Jul 2014 in Servers, Announcements
I've added a cron.daily script that will run zsync and pull down the most recent ISOs that we're likely to want around HCMC - specifically, it will grab the Trusty desktop, server, and Gnome-shell ISOs and store them in the ${SERVER_URL}/hcmc/iso directory.
It looks like this:
#!/bin/bash zsync -qo /var/www/hcmc/iso/ubuntu-14.04-desktop-amd64.iso http://ubuntu-releases.mirror.nexicom.net/trusty/ubuntu-14.04-desktop-amd64.iso.zsync zsync -qo /var/www/hcmc/iso/ubuntu-14.04-server-amd64.iso http://ubuntu-releases.mirror.nexicom.net/trusty/ubuntu-14.04-server-amd64.iso.zsync zsync -qo /var/www/hcmc/iso/ubuntu-gnome-14.04-desktop-amd64.iso http://cdimage.ubuntu.com/ubuntu-gnome/releases/trusty/release/ubuntu-gnome-14.04-desktop-amd64.iso.zsync zsync -qo /var/www/hcmc/iso/daily-desktop-amd64.iso http://cdimage.ubuntu.com/daily-live/current/utopic-desktop-amd64.iso.zsync rm -rf /var/www/hcmc/iso/*.zs-old
--args: q is for quiet, o is for output file. In this case it includes an explicit path to the output file