daemon_linux.go 408 B

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