Compare commits

...

1 Commits

Author SHA1 Message Date
MickLesk
08edf11def InvenTree: run apt under systemd so postinst can finish
1.6.0's postinst walks parent PIDs until PID 1 to collect settings. Under pct exec the chain ends at PID 0, and since InvenTree #12995 turned the loop's [ ] into [[ ]] it no longer breaks out there, so the install hung printing ps and strings errors. systemd-run makes systemd the parent.
2026-10-20 11:07:39 +02:00
2 changed files with 7 additions and 3 deletions

View File

@@ -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

View File

@@ -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"