summaryrefslogtreecommitdiff
path: root/src/timesync/timesyncd.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-21 17:19:28 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-21 17:24:21 +0200
commitaf4ec4309e8f82aad87a8d574785c12f8763d5f8 (patch)
treea592a4d9bae7af0d2bfccd2206c0be32e0712c7b /src/timesync/timesyncd.c
parent308d72dc1e2106f94ae637e2ea510e8d466d2af1 (diff)
notify: send STOPPING=1 from our daemons
Diffstat (limited to 'src/timesync/timesyncd.c')
-rw-r--r--src/timesync/timesyncd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index 351bfd0236..ee3bc99ae0 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -132,7 +132,9 @@ int main(int argc, char *argv[]) {
log_warning("Failed to parse configuration file: %s", strerror(-r));
log_debug("systemd-timesyncd running as pid %lu", (unsigned long) getpid());
- sd_notify(false, "READY=1");
+ sd_notify(false,
+ "READY=1\n"
+ "STATUS=Daemon is running");
if (network_is_online()) {
r = manager_connect(m);
@@ -153,7 +155,9 @@ int main(int argc, char *argv[]) {
sd_event_get_exit_code(m->event, &r);
finish:
- sd_notify(false, "STATUS=Shutting down...");
+ sd_notify(false,
+ "STOPPING=1\n"
+ "STATUS=Shutting down...");
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}