openWRT.sh 782 B

1234567891011121314
  1. #!/bin/bash
  2. wget -c https://downloads.openwrt.org/releases/23.05.4/targets/x86/64/openwrt-23.05.4-x86-64-generic-squashfs-rootfs.img.gz
  3. gzip -d openwrt-23.05.4-x86-64-generic-squashfs-rootfs.img.gz
  4. unsquashfs openwrt-23.05.4-x86-64-generic-squashfs-rootfs.img
  5. apt install squashfs-tools
  6. unsquashfs openwrt-23.05.4-x86-64-generic-squashfs-rootfs.img
  7. cd squashfs-root/
  8. tar -czf ../openwrt-x86-64-generic-squashfs-rootfs-plus-daily.tar.gz *
  9. cd ..
  10. cp openwrt-x86-64-generic-squashfs-rootfs-plus-daily.tar.gz /var/lib/vz/template/cache/
  11. pct create 100 local:vztmpl/openwrt-x86-64-generic-squashfs-rootfs-plus-daily.tar.gz --rootfs local:1 --ostype unmanaged --hostname OpenWrtAll --arch amd64 --cores 2 --memory 1024 --swap 0 -net0 bridge=vmbr0,name=eth0