[#1283] Clear systemd-notify status on exit

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
Aleksey Savchuk 2024-09-12 17:05:14 +03:00
parent e3764c51df
commit 546d09660f
3 changed files with 14 additions and 0 deletions

View file

@ -69,6 +69,11 @@ func Status(status string) error {
return Send("STATUS=" + status)
}
// ClearStatus resets the current service status previously set by Status.
func ClearStatus() error {
return Status("")
}
// Send state through the notify socket if any.
// If the notify socket was not detected, it returns an error.
func Send(state string) error {