fix(installer): restart running service after OpenWrt updates - #763
Merged
Conversation
Contributor
Documentation previewThe documentation preview has been deployed for this pull request. |
stackia
marked this pull request as ready for review
September 10, 2026 09:13
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_7cc38ebd-586a-4dd6-9036-43f2d6828f92) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updating with the OpenWrt installer could leave the old process running, so the status page continued to show the previous version. Capture the service state before package installation and restart previously running services after all packages install successfully.
Wait up to 10 seconds for procd to report a running instance. Restart failures and startup timeouts return an error with recovery instructions. Fresh installations and previously stopped services retain manual-start instructions.
Validation: shell syntax and diff checks, plus 12 mocked shell scenarios covering opkg/apk, running/stopped services, asynchronous startup, restart failure, startup timeout, and package failure. Not yet tested on a physical OpenWrt device.
Fixes #762
Note
Low Risk
Installer-only behavior change with no auth or data-path impact; main risk is a brief service interruption or a failed restart after packages already installed.
Overview
The OpenWrt quick installer now records whether
rtp2httpdwas running beforeopkg/apkinstalls, then restarts it after a successful upgrade so the new binary actually runs (fixing stale version on the status page).A new
restart_servicepath runs/etc/init.d/rtp2httpd restart, polls for up to 10 seconds for procd to report running, and surfaces bilingual errors with manual recovery steps if restart or startup fails. Users are warned that active playback may briefly disconnect; fresh installs or stopped services still get the manual “start the service” next step.Reviewed by Cursor Bugbot for commit 1e49cc9. Configure here.