Update build.func

This commit is contained in:
CanbiZ 2025-08-04 12:32:56 +02:00
parent e10cbff31c
commit 441a69c85d

View File

@ -1428,14 +1428,17 @@ EOF'
fi fi
msg_ok "Customized LXC Container" msg_ok "Customized LXC Container"
if ! lxc-attach -n "$CTID" -- bash -s < <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh); then lxc-attach -n "$CTID" -- bash -c '
EXITCODE=$? bash -s < /dev/stdin
echo "DEBUG: lxc-attach exit code was $EXITCODE" echo __EXITCODE__$?
if [[ $EXITCODE -eq 10 ]]; then ' < <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh) | tee /tmp/app_install.log
destroy_lxc
fi EXITCODE=$(awk -F__EXITCODE__ '/__EXITCODE__/{print $2}' /tmp/app_install.log | tail -n1)
exit $EXITCODE echo "DEBUG: Parsed container exit code: $EXITCODE"
if [[ "$EXITCODE" == "10" ]]; then
destroy_lxc
fi fi
exit "$EXITCODE"
} }
destroy_lxc() { destroy_lxc() {