Created template for server process subcommands
This commit is contained in:
@@ -7,17 +7,16 @@ import (
|
||||
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
Use: "warewulfd",
|
||||
Short: "Warewulf Daemon Service",
|
||||
Long: "This is the primary Warewulf service for provisioning nodes",
|
||||
RunE: CobraRunE,
|
||||
PersistentPreRunE: rootPersistentPreRunE,
|
||||
Use: "warewulfd",
|
||||
Short: "Warewulf Daemon Service",
|
||||
Long: "This is the primary Warewulf system for provisioning nodes",
|
||||
RunE: CobraRunE,
|
||||
PersistentPreRunE: rootPersistentPreRunE,
|
||||
}
|
||||
verboseArg bool
|
||||
debugArg bool
|
||||
debugArg bool
|
||||
)
|
||||
|
||||
|
||||
func init() {
|
||||
baseCmd.PersistentFlags().BoolVarP(&verboseArg, "verbose", "v", false, "Run with increased verbosity.")
|
||||
baseCmd.PersistentFlags().BoolVarP(&debugArg, "debug", "d", false, "Run with debugging messages enabled.")
|
||||
@@ -37,4 +36,4 @@ func rootPersistentPreRunE(cmd *cobra.Command, args []string) error {
|
||||
wwlog.SetLevel(wwlog.INFO)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user