From b0c3978bbfd535daccbade3a620dd112acee6c6a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 26 Aug 2025 11:25:56 +0200 Subject: [PATCH] Update create_lxc.sh --- misc/create_lxc.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misc/create_lxc.sh b/misc/create_lxc.sh index f4d4d07b..5b10404b 100644 --- a/misc/create_lxc.sh +++ b/misc/create_lxc.sh @@ -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