- Add `install` subcommand with alias `i` - Support two installation methods: systemd (default) and service - Copy binary to /usr/local/bin/go-alived - Auto-detect network interface and hostname for config generation - Create /etc/go-alived directory and config.yaml - Install systemd service file with proper capabilities - Display clear completion message with next steps - Bump version to 1.2.0 🤖 Generated with [Qoder][https://qoder.com]
25 lines
489 B
Go
25 lines
489 B
Go
package cmd
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var rootCmd = &cobra.Command{
|
|
Use: "go-alived",
|
|
Short: "Go-Alived - VRRP High Availability Service",
|
|
Long: `go-alived is a lightweight, dependency-free VRRP implementation in Go.
|
|
It provides high availability for IP addresses with health checking support.`,
|
|
Version: "1.2.0",
|
|
}
|
|
|
|
func Execute() {
|
|
if err := rootCmd.Execute(); err != nil {
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.CompletionOptions.DisableDefaultCmd = true
|
|
} |