Skip to content

feat: restart centy-daemon after install - #6

Merged
tupe12334 merged 2 commits into
mainfrom
feat/daemon-restart
Feb 15, 2026
Merged

tupe12334 merged 2 commits into
mainfrom
feat/daemon-restart

Conversation

@tupe12334

Copy link
Copy Markdown
Member

Summary

  • Add daemon.rs module that detects running centy-daemon (via PID file at ~/.centy/daemon.pid or pgrep), stops it gracefully (SIGTERM with SIGKILL fallback), and restarts it with the newly installed binary
  • Wire restart logic into the install flow — after writing the binary, the daemon is automatically restarted if running
  • Add --no-restart CLI flag to skip daemon restart when the user wants to manage the lifecycle manually
  • Support both Unix (kill/pgrep) and Windows (taskkill/tasklist) process management

Closes #5

Test plan

  • All 63 unit tests pass (cargo test --lib)
  • Clippy clean with -D warnings
  • Manual test: install with daemon running, verify restart message appears
  • Manual test: install with --no-restart, verify daemon is not restarted
  • Manual test: fresh install (no daemon running), verify no restart attempted

🤖 Generated with Claude Code

tupe12334 and others added 2 commits February 15, 2026 20:06
After installing/upgrading the binary, the installer now detects if
centy-daemon is running (via PID file or process search), stops it
gracefully with SIGTERM (falling back to SIGKILL), and restarts it.
Adds --no-restart flag to skip this behavior.

Closes #5

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tupe12334
tupe12334 merged commit b0e0e57 into main Feb 15, 2026
2 checks passed
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.

1 participant