mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-03-08 13:19:05 +00:00
Feature Template Path for Mountings (#2785)
This commit is contained in:
parent
9302e2e27d
commit
9bf30de4cb
@ -221,7 +221,8 @@ mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($TEMPLA
|
|||||||
exit 207
|
exit 207
|
||||||
}
|
}
|
||||||
TEMPLATE="${TEMPLATES[-1]}"
|
TEMPLATE="${TEMPLATES[-1]}"
|
||||||
TEMPLATE_PATH="/var/lib/vz/template/cache/$TEMPLATE"
|
TEMPLATE_PATH="$(pvesm path $TEMPLATE_STORAGE:vztmpl/$TEMPLATE)"
|
||||||
|
# Without NAS/Mount: TEMPLATE_PATH="/var/lib/vz/template/cache/$TEMPLATE"
|
||||||
# Check if template exists, if corrupt remove and redownload
|
# Check if template exists, if corrupt remove and redownload
|
||||||
if ! pveam list "$TEMPLATE_STORAGE" | grep -q "$TEMPLATE" || ! zstdcat "$TEMPLATE_PATH" | tar -tf - >/dev/null 2>&1; then
|
if ! pveam list "$TEMPLATE_STORAGE" | grep -q "$TEMPLATE" || ! zstdcat "$TEMPLATE_PATH" | tar -tf - >/dev/null 2>&1; then
|
||||||
msg_warn "Template $TEMPLATE not found in storage or seems to be corrupted. Redownloading."
|
msg_warn "Template $TEMPLATE not found in storage or seems to be corrupted. Redownloading."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user