From 4eab340a3a108e3d3b5f53ce6ef781df3bbf8d69 Mon Sep 17 00:00:00 2001 From: rchac Date: Tue, 14 Apr 2026 19:03:34 +0000 Subject: [PATCH] changes --- docs/v2.0/troubleshooting.md | 2 +- src/build_dpkg.sh | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/v2.0/troubleshooting.md b/docs/v2.0/troubleshooting.md index 2ea8075e..c4c5ee96 100644 --- a/docs/v2.0/troubleshooting.md +++ b/docs/v2.0/troubleshooting.md @@ -152,7 +152,7 @@ file /opt/libreqos/src/liblqos_python.so ldd /opt/libreqos/src/liblqos_python.so ``` -Routine package upgrades now invoke `lqos_setup --skip-if-ready` during `postinst`. If `/etc/lqos.conf` loads, shaping interfaces are already selected and present, bandwidth is non-zero, and `network.json` plus `ShapedDevices.csv` already exist, the package skips the interactive Cursive setup screen instead of trying to launch a TUI during the upgrade. +Routine package upgrades now keep `lqosd` in charge of the main WebUI when `/etc/lqos.conf` already exists. Current packages no longer start the dedicated `lqos_setup` web service during a normal upgrade just because newer first-run checks are incomplete. If the upgraded host still needs a first admin user or a topology source, finish that work in the normal WebUI (`first-run.html` or `Complete Setup`) instead of expecting `lqos_setup` to take over port `9123`. If startup shaping fails because `shaping_inputs.json` is missing or stale, current builds leave the scheduler running in a degraded state and wait for the next scheduled full refresh to recover. The high-frequency topology refresh tick stays disabled until one shaping pass completes successfully, so repeated 3-second refresh attempts should not continue hammering a fresh install that has not produced runtime topology inputs yet. diff --git a/src/build_dpkg.sh b/src/build_dpkg.sh index c7c007c6..7c3fd0e7 100755 --- a/src/build_dpkg.sh +++ b/src/build_dpkg.sh @@ -140,6 +140,16 @@ else fi } +should_activate_runtime_on_upgrade() { +local previous_version="${2:-}" + +# Debian passes the previous package version as the second postinst argument on +# upgrade. If an existing LibreQoS config is already present, keep runtime +# services in charge of the main WebUI and let lqosd handle any follow-up +# onboarding instead of launching the dedicated setup web service on port 9123. +[ -n "$previous_version" ] && [ -f /etc/lqos.conf ] +} + # Install Python Dependencies pushd /opt/libreqos > /dev/null # - Setup Python dependencies as a post-install task. Use --ignore-installed so @@ -165,7 +175,9 @@ install -m 0644 /opt/libreqos/src/bin/lqos_setup.service.example /etc/systemd/sy /bin/systemctl disable lqos_node_manager || true # In case it's running from a previous release /bin/systemctl stop lqos_netplan_helper || true /bin/systemctl disable lqos_netplan_helper || true -if /opt/libreqos/src/bin/lqos_setup is-ready; then +if should_activate_runtime_on_upgrade "$@"; then +/opt/libreqos/src/bin/lqos_setup activate-runtime +elif /opt/libreqos/src/bin/lqos_setup is-ready; then /opt/libreqos/src/bin/lqos_setup activate-runtime else /opt/libreqos/src/bin/lqos_setup activate-setup