Update pve6_ha_container.sh

This commit is contained in:
tteck 2021-08-19 13:26:26 -04:00 committed by GitHub
parent a05a2295db
commit 31b0c5e2da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -102,12 +102,12 @@ info "Using '$STORAGE' for storage location."
CTID=$(pvesh get /cluster/nextid) CTID=$(pvesh get /cluster/nextid)
info "Container ID is $CTID." info "Container ID is $CTID."
# Download latest Debian 10 LXC template # Download latest Debian 11 LXC template
msg "Updating LXC template list..." msg "Updating LXC template list..."
pveam update >/dev/null pveam update >/dev/null
msg "Downloading LXC template..." msg "Downloading LXC template..."
OSTYPE=debian OSTYPE=debian
OSVERSION=${OSTYPE}-10 OSVERSION=${OSTYPE}-11
mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V) mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V)
TEMPLATE="${TEMPLATES[-1]}" TEMPLATE="${TEMPLATES[-1]}"
pveam download local $TEMPLATE >/dev/null || pveam download local $TEMPLATE >/dev/null ||