mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-14 03:39:16 +00:00
Update create_lxc.sh
This commit is contained in:
parent
dd9f5523e4
commit
4594fcb34f
@ -203,15 +203,13 @@ PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}})
|
|||||||
# Create container with template integrity check
|
# Create container with template integrity check
|
||||||
msg_info "Creating LXC Container"
|
msg_info "Creating LXC Container"
|
||||||
if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then
|
if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then
|
||||||
|
|
||||||
[[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH"
|
[[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH"
|
||||||
|
|
||||||
msg_ok "Template integrity check completed"
|
msg_ok "Template integrity check completed"
|
||||||
|
|
||||||
|
|
||||||
pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null ||
|
pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null ||
|
||||||
|
|
||||||
{ msg_error "A problem occurred while re-downloading the LXC template."; exit 208; }
|
{ msg_error "A problem occurred while re-downloading the LXC template."; exit 208; }
|
||||||
msg_ok "Re-downloaded LXC Template"
|
msg_ok "Re-downloaded LXC Template"
|
||||||
|
|
||||||
if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then
|
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
|
exit 200
|
||||||
|
Loading…
Reference in New Issue
Block a user