Skip to content

Commit 9bf30de

Browse files
authored
Feature Template Path for Mountings (#2785)
1 parent 9302e2e commit 9bf30de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ct/create_lxc.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($TEMPLA
221221
exit 207
222222
}
223223
TEMPLATE="${TEMPLATES[-1]}"
224-
TEMPLATE_PATH="/var/lib/vz/template/cache/$TEMPLATE"
224+
TEMPLATE_PATH="$(pvesm path $TEMPLATE_STORAGE:vztmpl/$TEMPLATE)"
225+
# Without NAS/Mount: TEMPLATE_PATH="/var/lib/vz/template/cache/$TEMPLATE"
225226
# Check if template exists, if corrupt remove and redownload
226227
if ! pveam list "$TEMPLATE_STORAGE" | grep -q "$TEMPLATE" || ! zstdcat "$TEMPLATE_PATH" | tar -tf - >/dev/null 2>&1; then
227228
msg_warn "Template $TEMPLATE not found in storage or seems to be corrupted. Redownloading."

0 commit comments

Comments
 (0)