[client] Stop and remove the daemon on netbird-ui cask uninstall - #6977
Conversation
📝 WalkthroughWalkthroughThe macOS cask uninstall preflight now uses a privileged shell script to stop the NetBird launch daemon with fallback handling and remove its system plist. ChangesmacOS uninstall cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@client/ui/netbird-ui.rb.tmpl`:
- Around line 32-38: Update the daemon-stop command in the system_command
uninstall block to ignore only expected “service not found” states from
launchctl, while propagating other bootout/unload failures. Ensure rm -f
/Library/LaunchDaemons/netbird.plist runs only after a successful stop or
confirmed absence, and remove the unconditional || true that masks failures.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 914fcb91-47a0-469d-b5ad-dc48b2366144
📒 Files selected for processing (1)
client/ui/netbird-ui.rb.tmpl
Release artifactsBuilt for PR head
GHCR images (amd64)
This comment is updated by the Release workflow. Artifact links expire according to the workflow retention policy. |



Describe your changes
brew uninstall --cask netbird-uileft the daemon running and its LaunchDaemon plist in place, because the cask invoked the bundleduninstaller.shwithout sudo and that script only printed instructions. The same fix was merged into the tap in netbirdio/homebrew-tap#6, but the cask is regenerated from this template on every release, so it was overwritten again.netbirdsystem daemon and remove/Library/LaunchDaemons/netbird.pliston cask uninstall.appIssue ticket number and link
Fixes #5852, #1924, #5135
Tap-side fix: netbirdio/homebrew-tap#6
Stack
Checklist
Documentation
Select exactly one:
Packaging fix with no user-facing change beyond uninstall behaving as documented.
Docs PR URL (required if "docs added" is checked)
Paste the PR link from https://github.com/netbirdio/docs here:
https://github.com/netbirdio/docs/pull/__
Summary by CodeRabbit