2023-03-03 14:55:29 +01:00
|
|
|
package cli
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/rs/zerolog/log"
|
2023-03-03 18:22:47 +01:00
|
|
|
"github.com/spf13/cobra"
|
2023-03-03 14:55:29 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
rootCmd.AddCommand(configTestCmd)
|
|
|
|
}
|
|
|
|
|
|
|
|
var configTestCmd = &cobra.Command{
|
|
|
|
Use: "configtest",
|
|
|
|
Short: "Test the configuration.",
|
|
|
|
Long: "Run a test of the configuration and exit.",
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
2024-09-07 09:23:58 +02:00
|
|
|
_, err := newHeadscaleServerWithConfig()
|
2023-03-03 14:55:29 +01:00
|
|
|
if err != nil {
|
|
|
|
log.Fatal().Caller().Err(err).Msg("Error initializing")
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|