Various more updates around Warewulf service and erorr cleanup

This commit is contained in:
Gregory Kurtzer
2021-09-10 18:25:58 -07:00
parent 2cabe4b806
commit 09652cd56d
6 changed files with 34 additions and 29 deletions

View File

@@ -7,5 +7,9 @@ import (
)
func CobraRunE(cmd *cobra.Command, args []string) error {
return errors.Wrap(warewulfd.DaemonStop(), "failed to stop warewulf daemon")
err := warewulfd.DaemonStop()
if err != nil {
return errors.Wrap(err, "failed to stop Warewulf server")
}
return errors.Wrap(warewulfd.DaemonStart(), "failed to start Warewulf server")
}