Skip to content

Free ports 80/443 on magebox global stop (#108) - #143

Open
Aquive wants to merge 1 commit into
qoliber:mainfrom
Aquive:fix/global-stop-frees-web-ports
Open

Free ports 80/443 on magebox global stop (#108)#143
Aquive wants to merge 1 commit into
qoliber:mainfrom
Aquive:fix/global-stop-frees-web-ports

Conversation

@Aquive

@Aquive Aquive commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #108.

magebox global stop stopped 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 stop unloads the daemon and waits until port 80 is actually released.
  • global start loads it again (falls back to kickstart when launchd already knows the service).
  • global status shows the port forwarding state on macOS.
  • The plist stays installed, so forwarding comes back without running magebox bootstrap; a reboot restores it too.
  • macOS-only — on Linux all three are no-ops.

Tests cover the new waitFor poll helper, IsSupported, and the Linux no-op paths. make lint and make test pass. Not verified end-to-end on macOS (needs sudo/launchctl) — @LouisdeLooze could you check?

`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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

magebox global stop does not free web ports on macOS

1 participant