diff --git a/ct/inventree.sh b/ct/inventree.sh index 601727863..e5e8bf8a1 100644 --- a/ct/inventree.sh +++ b/ct/inventree.sh @@ -58,7 +58,9 @@ function update_script() { msg_info "Updating InvenTree" apt_update_safe - $STD apt install --only-upgrade inventree -y + # postinst loops forever unless its parent chain reaches PID 1 (not the case under pct exec) + $STD systemd-run --wait --pipe --quiet --collect --setenv=DEBIAN_FRONTEND=noninteractive \ + apt-get install --only-upgrade -y inventree msg_ok "Updated InvenTree" msg_ok "Updated successfully!" exit diff --git a/install/inventree-install.sh b/install/inventree-install.sh index ff2fb25c7..bf2a07761 100644 --- a/install/inventree-install.sh +++ b/install/inventree-install.sh @@ -23,8 +23,10 @@ setup_deb822_repo \ msg_ok "Set up InvenTree Repository" msg_info "Installing InvenTree (Patience)" -export SETUP_NO_CALLS=true -$STD apt install -y inventree +# The package's postinst walks parent PIDs until it reaches PID 1; under pct exec the chain ends at 0 +# and since 1.6.0 that loops forever, so apt runs as a child of systemd +$STD systemd-run --wait --pipe --quiet --collect --setenv=SETUP_NO_CALLS=true --setenv=DEBIAN_FRONTEND=noninteractive \ + apt-get install -y inventree msg_ok "Installed InvenTree" msg_info "Configuring InvenTree"