Repository navigation
Free ports 80/443 on magebox global stop (#108) - #143
Merged
Merged
Conversation
`global stop` stopped Nginx and Docker but left the port forwarding LaunchDaemon loaded, so ports 80 and 443 stayed occupied. It now unloads the daemon and waits until port 80 is released; `global start` loads it again and `global status` reports the forwarding state on macOS. The plist stays installed, so forwarding returns without a bootstrap. Claude-Session: https://claude.ai/code/session_01Wr5Hs4AEodX65PAKimjZ58
Aquive
force-pushed
the
fix/global-stop-frees-web-ports
branch
from
September 1, 2026 11:00
f5026bc to
b7784a6
Compare
Merged
jakwinkler
added a commit
that referenced
this pull request
Sep 22, 2026
Follow-up to #143, which freed ports 80/443 on `magebox global stop`. `Start` had its own daemon-starting path that skipped the plist version check, so it could load an outdated daemon; it now delegates to `EnsureRulesActive`, the single reconciler that installs, upgrades and kickstarts. `Stop` reported failure whenever port 80 was still busy after the daemon was unloaded, even though an unrelated local service is free to take the port — which is the whole point of releasing it. `stopVerdict` now fails only while MageBox's own daemon is still loaded. `Stop` also returns early when nothing is listening, so an already-stopped environment no longer prompts for a sudo password, and the unload path wires stdin and stderr so that prompt and any launchctl error are visible. Docs: document the sudo requirement in the command reference, correct the FAQ claim that no daily operation needs sudo, and note the macOS step in the testing matrix. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
Fixes #108.
magebox global stopstopped Nginx and the Docker services but left the port forwarding LaunchDaemon (com.magebox.portforward) loaded, so ports 80 and 443 stayed occupied and other local dev tools could not bind them.Changes
global stopunloads the daemon and waits until port 80 is actually released.global startloads it again (falls back tokickstartwhen launchd already knows the service).global statusshows the port forwarding state on macOS.magebox bootstrap; a reboot restores it too.Tests cover the new
waitForpoll helper,IsSupported, and the Linux no-op paths.make lintandmake testpass. Not verified end-to-end on macOS (needs sudo/launchctl) — @LouisdeLooze could you check?