1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-03-08 13:19:05 +00:00

Update create_lxc.sh

This commit is contained in:
CanbiZ 2025-02-07 14:57:57 +01:00 committed by GitHub
parent da9f1b1209
commit 4948104591
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -204,7 +204,7 @@ PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}})
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"
[[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH"
msg_ok "Template integrity check completed"
msg_info "Re-downloading LXC Template"
@ -213,7 +213,7 @@ msg_info "Creating LXC Container"
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."
msg_error "A problem occurred while trying to create container after re-downloading template."
exit 200
fi
fi