This commit is contained in:
Daniel
2024-11-12 13:30:47 +01:00
parent ddf7ba170e
commit 8b1bdc7eb1
9 changed files with 70 additions and 50 deletions

View File

@@ -24,6 +24,7 @@ import (
func init() {
// flag.BoolVar(&updates.RebootOnRestart, "reboot-on-restart", false, "reboot server on auto-upgrade")
// FIXME
}
var sigUSR1 = syscall.Signal(0xa)
@@ -48,6 +49,8 @@ func main() {
log.SetLogLevel(log.WarningLevel)
_ = log.Start()
// FIXME: Use service?
// Create instance.
var execCmdLine bool
instance, err := spn.New()
@@ -109,7 +112,7 @@ func main() {
slog.Warn("program was interrupted, stopping")
}
case <-instance.Stopped():
case <-instance.ShutdownComplete():
log.Shutdown()
os.Exit(instance.ExitCode())
}