Automatically reload daemon configuration file when configuration file is changed.

This commit is contained in:
Gregory Kurtzer
2021-02-12 23:00:03 -08:00
parent e7c6fe3abe
commit 88dbec7ed9
4 changed files with 9 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/hpcng/warewulf/internal/pkg/kernel"
"github.com/hpcng/warewulf/internal/pkg/node"
"github.com/hpcng/warewulf/internal/pkg/warewulfd"
"github.com/hpcng/warewulf/internal/pkg/wwlog"
"github.com/spf13/cobra"
"os"
@@ -43,6 +44,8 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
}
nodeDB.Persist()
fmt.Printf("Set default kernel version to: %s\n", args[0])
warewulfd.DaemonReload()
}
}