From 4594fcb34fed7b16ccb94411da73e8a9cfb70b32 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 7 Feb 2025 15:11:49 +0100 Subject: [PATCH] Update create_lxc.sh --- ct/create_lxc.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 6d9ab4c1..8ac784cd 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -203,15 +203,13 @@ 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 - [[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH" + msg_ok "Template integrity check completed" - - 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" - if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then msg_error "A problem occurred while trying to create container after re-downloading template." exit 200