Update create_lxc.sh

This commit is contained in:
CanbiZ 2025-08-26 11:25:56 +02:00
parent 7e8f4b613b
commit b0c3978bbf

View File

@ -299,7 +299,11 @@ mapfile -t ONLINE_TEMPLATES < <(
sed -n "s/.*\($TEMPLATE_SEARCH.*$TEMPLATE_PATTERN.*\)/\1/p" |
sort -t - -k 2 -V
)
ONLINE_TEMPLATE="${ONLINE_TEMPLATES[-1]:-}"
if [ ${#ONLINE_TEMPLATES[@]} -gt 0 ]; then
ONLINE_TEMPLATE="${ONLINE_TEMPLATES[-1]}"
else
ONLINE_TEMPLATE=""
fi
# 3. Local vs Online
if [ ${#LOCAL_TEMPLATES[@]} -gt 0 ]; then