arch-iso-chainload-with-grub

script downloading once monthly the arch iso via scraped magnet link, copy the last iso and overwrite with current, grub grub.cfg for chainloading both images, systemd-boot grub.conf for chainloading grub.efi, systemd service and timer for once monthly o
Log | Files | Refs

arch-iso-downloader (537B)


      1 #!/bin/bash
      2 magnet=$(curl -sLo /dev/stdout 'https://archlinux.org/download/' | htmlq 'a[title="Magnet link"]' -a 'href')
      3 tracker="udp://tracker.opentrackr.org:1337/announce"
      4 location="/tmp"
      5 filename="archlinux-x86_64.iso"
      6 isos="/boot/isos"
      7 
      8 if aria2c "$magnet" --bt-tracker "$tracker" --seed-time=0 -d "$location" -O 1="$filename"
      9 then
     10 	cp "$isos/$filename" "$isos/last-$filename" 
     11 	mv "$location/$filename" "$isos/$filename"
     12 	logger "Arch monthly iso downloaded successfully"
     13 else
     14 	logger "Arch monthly iso download FAILED!"
     15 	exit 1
     16 fi