Files
goswi/notify_nop.go
Gwyneth Llewelyn b731843718 Feat: add more systemd notifications
Should go to the standard log otherwis.
2025-11-06 18:22:43 +00:00

29 lines
656 B
Go

//go:build !systemd
package main
import (
"os"
)
// talk to systemd, inform that we're reloading
func notify(notification notificationType) {
switch notification {
case appReloading:
config.LogTrace("(re)loading app configuration...")
case appReady:
config.LogTrace("app configuration loaded, system is now ready!")
case appStopping:
config.LogTrace("stopping app...")
case appStoppingError:
config.LogFatal("fatal system error, code 126")
os.Exit(126)
}
}
// Auxiliary function to communicate with the systemd daemon and spew out the appropriate messages.
func systemdNotify(state string) error {
config.LogInfo(state)
return nil
}