From 03a2ca1e3c1ad7fc9dcc15795e5660ffed7531b5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 30 Jun 2025 14:59:48 +0200 Subject: [PATCH] Update create_lxc.sh --- misc/create_lxc.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/misc/create_lxc.sh b/misc/create_lxc.sh index 5874ac69..10592a92 100644 --- a/misc/create_lxc.sh +++ b/misc/create_lxc.sh @@ -265,15 +265,11 @@ PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) # Secure creation of the LXC container with lock and template check lockfile="/tmp/template.${TEMPLATE}.lock" -exec 9>"$lockfile" >/dev/null 2>&1 || { - msg_error "Failed to create lock file '$lockfile'." - exit 200 -} +exec 9>"$lockfile" flock -w 60 9 || { msg_error "Timeout while waiting for template lock" exit 211 } - msg_info "Creating LXC Container" if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then msg_error "Container creation failed. Checking if template is corrupted or incomplete."