From dd9f5523e423a244bfdd15c61452f45414e44dee Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Fri, 7 Feb 2025 15:05:13 +0100 Subject: [PATCH] Update create_lxc.sh --- ct/create_lxc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index b258dbf1e..6d9ab4c19 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -203,11 +203,11 @@ PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) # Create container with template integrity check msg_info "Creating LXC Container" if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then - msg_info "Container creation failed, checking template integrity..." + [[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH" msg_ok "Template integrity check completed" - msg_info "Re-downloading LXC Template" + pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null || { msg_error "A problem occurred while re-downloading the LXC template."; exit 208; } msg_ok "Re-downloaded LXC Template"