#!/bin/bash rm -rf ./openwrt-* wget -c https://downloads.openwrt.org/releases/23.05.4/targets/x86/64/openwrt-24.10.4-x86-64-generic-squashfs-rootfs.img.gz #wget -c https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-x86-64-generic-squashfs-rootfs.img.gz gzip -d openwrt-*-generic-squashfs-rootfs.img.gz unsquashfs openwrt-*-generic-squashfs-rootfs.img apt install squashfs-tools unsquashfs openwrt-*-generic-squashfs-rootfs.img cd squashfs-root/ tar -czf ../openwrt-x86-64-generic-squashfs-rootfs.tar.gz * cd .. cp openwrt-x86-64-generic-squashfs-rootfs.tar.gz /var/lib/vz/template/cache/ pct create 100 local:vztmpl/openwrt-x86-64-generic-squashfs-rootfs.tar.gz --rootfs local:1 --ostype unmanaged --hostname OpenWrtAll --arch amd64 --cores 2 --memory 1024 --swap 0 -net0 bridge=vmbr1,name=eth0