2026-04-29

This commit is contained in:
2026-04-29 22:52:33 +08:00
parent e762cbdfe3
commit 3ffefa66c3
28 changed files with 1442 additions and 19 deletions

View 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
}