daemon_linux.go 420 B

12345678910111213
  1. package main
  2. import systemdDaemon "github.com/coreos/go-systemd/v22/daemon"
  3. // preNotifySystem sends a message to the host when the API is active, but before the daemon is
  4. func preNotifySystem() {
  5. }
  6. // notifySystem sends a message to the host when the server is ready to be used
  7. func notifySystem() {
  8. // Tell the init daemon we are accepting requests
  9. go systemdDaemon.SdNotify(false, systemdDaemon.SdNotifyReady)
  10. }