added warewuld configure option

Co-authored-by: Jonathon Anderson <janderson@ciq.com>
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Christian Goll
2025-07-25 15:53:17 +02:00
committed by Jonathon Anderson
parent f2d06d5928
commit 2c51ca7fff
9 changed files with 174 additions and 16 deletions

View File

@@ -0,0 +1,10 @@
package warewulfd
import (
"github.com/spf13/cobra"
"github.com/warewulf/warewulf/internal/pkg/configure"
)
func CobraRunE(cmd *cobra.Command, args []string) error {
return configure.WAREWULFD()
}

View File

@@ -0,0 +1,23 @@
package warewulfd
import (
"github.com/spf13/cobra"
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
)
var (
baseCmd = &cobra.Command{
DisableFlagsInUseLine: true,
Use: "warewulfd [OPTIONS]",
Short: "Enable and start warewulfd",
Long: "Enable and starts the warewulfd service.",
RunE: CobraRunE,
Args: cobra.NoArgs,
ValidArgsFunction: completions.None,
}
)
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}