LXC:一鍵下載最新版本 LXC 模板

Debian:

URL="https://uk.lxd.images.canonical.com/images/debian/buster/amd64/default/" && curl -s $URL | grep folder | awk -v url="$URL" '{split($5,a,">"); split(a[2],b,"/")} END{system("curl "url b[1] "/rootfs.tar.xz -o /var/lib/vz/template/cache/Debian-buster-"b[1]".tar.xz")}'

Ubuntu-Focal(20.04LTS):

URL="https://uk.lxd.images.canonical.com/images/ubuntu/focal/amd64/default/" && curl -s $URL | grep folder | awk -v url="$URL" '{split($5,a,">"); split(a[2],b,"/")} END{system("curl "url b[1] "/rootfs.tar.xz -o /var/lib/vz/template/cache/Ubuntu-20.04-"b[1]".tar.xz")}'

OpenWRT:

URL="https://uk.lxd.images.canonical.com/images/openwrt/21.02/amd64/default/" && curl -s $URL | grep folder | awk -v url="$URL" '{split($5,a,">"); split(a[2],b,"/")} END{system("curl "url b[1] "/rootfs.tar.xz -o /var/lib/vz/template/cache/OpenWRT-21.02-"b[1]".tar.xz")}'

關聯:

阅读剩余
THE END