Update build.func
This commit is contained in:
parent
e10cbff31c
commit
441a69c85d
@ -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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user