From ee97d35bfea6e242752ceb5d755dcddb344def74 Mon Sep 17 00:00:00 2001 From: Jerod Hodgkin Date: Sat, 17 Jan 2026 12:02:01 -0700 Subject: [PATCH] Fix Proxmox script to find template dynamically Instead of hardcoding the template name, now searches for the latest available Debian 12 template. Co-Authored-By: Claude Opus 4.5 --- install.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 3b5d837..cdddc71 100644 --- a/install.sh +++ b/install.sh @@ -94,12 +94,24 @@ fi # Download Debian template if not exists header "Checking Container Template" -TEMPLATE="debian-12-standard_12.7-1_amd64.tar.zst" + +msg "Updating template list..." +pveam update + +# Find the latest Debian 12 template +TEMPLATE=$(pveam available --section system | grep "debian-12-standard" | tail -1 | awk '{print $2}') + +if [ -z "$TEMPLATE" ]; then + error "Could not find Debian 12 template. Available templates:" + pveam available --section system + exit 1 +fi + +msg "Using template: $TEMPLATE" TEMPLATE_PATH="/var/lib/vz/template/cache/$TEMPLATE" if [ ! -f "$TEMPLATE_PATH" ]; then - msg "Downloading Debian 12 template..." - pveam update + msg "Downloading $TEMPLATE..." pveam download $TEMPLATE_STORAGE $TEMPLATE else msg "Template already exists"