Repository navigation
Conversation
timwrb
marked this pull request as ready for review
November 8, 2026 02:08
This branch has not been deployed
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 #92
What and why
Quitting the menu bar or tray app leaves the daemon running, with every site, PHP worker and database. Until now the only way to stop it was
launchctl bootout(orStop-ScheduledTaskon Windows). This adds a clean way, in the CLI on every platform and in the macOS panel.Panel header (bird) Flock Running · v1.0.0 + [on/off switch]flock stopstops the daemon through each platform's service manager (launchdbootout,systemctl stop, ending the scheduled task), so it shuts down cleanly and stops everything it runs.flock startstarts it again. On macOS,restartServicenow loads the agent again when it was unloaded, soflock restartalso works after a stop.flock startor the next login. Nothing is disabled.flock startandflock stopindocs/cli.md, and a "Stopping Flock" section indocs/installation.md.Not in this PR: the Windows tray and the Linux app don't have the switch yet, but
flock stopandflock startalready work there. I'm happy to follow up with them, or to turn the switch into a Stop Flock item next to Restart (as #92 proposes) if you prefer that.How I tested it
On macOS (Apple silicon), against a running Flock 1.0.0 with PostgreSQL, MySQL, Redis, php-fpm and a FrankenPHP site:
go test ./internal/clipasses, andGOOS=linux/GOOS=windows go vet ./internal/cliare clean. I haven't run it on Linux or Windows.FlockScreenshotswith its demo data.