InvenTree: run apt under systemd so postinst can finish (#18029)

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.
This commit is contained in:
CanbiZ (MickLesk)
2026-10-20 13:23:56 +02:00
committed by GitHub
parent 1e0fd45962
commit b1e92ba2b7
2 changed files with 7 additions and 3 deletions
+3 -1
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