feat: add cross-platform service management (Windows SCM / systemd / … - #26
Open
MarksonHon wants to merge 1 commit into
Open
feat: add cross-platform service management (Windows SCM / systemd / …#26MarksonHon wants to merge 1 commit into
MarksonHon wants to merge 1 commit into
Conversation
…OpenRC / Procd / BSD rc.d) Introduce built-in service wrapper supporting all major init systems: - Windows: register/unregister with SCM, proper service event handling - Linux (systemd): auto-generate .service unit, systemctl enable/start - Linux (OpenRC): auto-generate init script, rc-update add/start - OpenWrt (Procd): auto-generate procd init script - FreeBSD (BSD rc.d): auto-generate rc.d script - Unknown: graceful error with manual setup instructions Key changes: - Remove feature gates; windows-service is now a regular dependency - Refactor src/service.rs into a directory module (mod.rs + windows.rs + unix.rs) - Add InitSystem auto-detection with documented priority order - Add init-detection-based install/uninstall for all supported systems - Implement Unix signal handling (SIGTERM/SIGINT/SIGQUIT) via tokio for service run - Keep CLI identical across platforms: 'kixdns service install|uninstall|run' - Update READMEs with bilingual collapsible service script templates
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.
…OpenRC / Procd / BSD rc.d)
Introduce built-in service wrapper supporting all major init systems:
Key changes: