summaryrefslogtreecommitdiff
path: root/lib/systemd.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/systemd.c')
-rw-r--r--lib/systemd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/systemd.c b/lib/systemd.c
index 8a2a5eeac3..44db48d006 100644
--- a/lib/systemd.c
+++ b/lib/systemd.c
@@ -86,6 +86,7 @@ static int systemd_get_watchdog_time(int the_process)
void systemd_send_stopping(void)
{
+ systemd_send_information("STATUS=");
systemd_send_information("STOPPING=1");
}
@@ -116,3 +117,11 @@ void systemd_send_started(struct thread_master *m, int the_process)
if (wsecs != 0)
thread_add_timer(m, systemd_send_watchdog, m, wsecs, NULL);
}
+
+void systemd_send_status(const char *status)
+{
+ char buffer[1024];
+
+ snprintf(buffer, sizeof(buffer), "STATUS=%s", status);
+ systemd_send_information(buffer);
+}