2015-07-29 14:25:56 -04:00
|
|
|
package main
|
|
|
|
|
2020-02-28 02:52:14 -05:00
|
|
|
import systemdDaemon "github.com/coreos/go-systemd/v22/daemon"
|
2015-09-23 19:42:08 -04:00
|
|
|
|
2020-12-22 04:43:01 -05:00
|
|
|
// preNotifyReady sends a message to the host when the API is active, but before the daemon is
|
|
|
|
func preNotifyReady() {
|
2017-02-01 13:52:16 -05:00
|
|
|
}
|
|
|
|
|
2020-12-22 04:43:01 -05:00
|
|
|
// notifyReady sends a message to the host when the server is ready to be used
|
|
|
|
func notifyReady() {
|
2015-09-23 19:42:08 -04:00
|
|
|
// Tell the init daemon we are accepting requests
|
2018-05-23 13:06:34 -04:00
|
|
|
go systemdDaemon.SdNotify(false, systemdDaemon.SdNotifyReady)
|
2015-09-23 19:42:08 -04:00
|
|
|
}
|
2020-12-22 04:43:01 -05:00
|
|
|
|
|
|
|
// notifyStopping sends a message to the host when the server is shutting down
|
|
|
|
func notifyStopping() {
|
|
|
|
go systemdDaemon.SdNotify(false, systemdDaemon.SdNotifyStopping)
|
|
|
|
}
|