feat: Enhance service manager with zinit socket discovery and systemd fallback
- Improve Linux support by automatically discovering zinit sockets using environment variables and common paths. - Add fallback to systemd if no zinit server is detected. - Enhance README with detailed instructions for zinit usage, including custom socket path configuration. - Add example demonstrating zinit socket discovery. - Add logging to show socket discovery process. - Add unit tests for service manager creation and socket discovery.
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
// Basic Service Manager Usage Example
|
||||
//
|
||||
// This example demonstrates the basic API of the service manager.
|
||||
// It works on both macOS (launchctl) and Linux (zinit).
|
||||
// It works on both macOS (launchctl) and Linux (zinit/systemd).
|
||||
//
|
||||
// Prerequisites:
|
||||
//
|
||||
// Linux: Make sure zinit is running:
|
||||
// Linux: The service manager will automatically discover running zinit servers
|
||||
// or fall back to systemd. To use zinit, start it with:
|
||||
// zinit -s /tmp/zinit.sock init
|
||||
//
|
||||
// You can also specify a custom socket path:
|
||||
// export ZINIT_SOCKET_PATH=/your/custom/path/zinit.sock
|
||||
//
|
||||
// macOS: No additional setup required (uses launchctl).
|
||||
//
|
||||
// Usage:
|
||||
|
Reference in New Issue
Block a user