2026-04-29
This commit is contained in:
22
internal/pkg/configure/sunhpcd.go
Normal file
22
internal/pkg/configure/sunhpcd.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package configure
|
||||
|
||||
import (
|
||||
sunhpcconf "gitea.sunhpc.com/kelvin/sunhpc/internal/pkg/config"
|
||||
"gitea.sunhpc.com/kelvin/sunhpc/internal/pkg/util"
|
||||
"gitea.sunhpc.com/kelvin/sunhpc/internal/pkg/splog"
|
||||
)
|
||||
|
||||
func SUNHPCD() (err error) {
|
||||
controller := sunhpcconf.Get()
|
||||
if controller.Sunhpc.SystemdName != "" {
|
||||
splog.Info("Enabling and restarting the Sunhpc server")
|
||||
err = util.SystemdStart(controller.Sunhpc.SystemdName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
splog.Warn("Not (re)starting Sunhpc server: no systemd name configured")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user