aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Main.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index 9b7679369..713701e6e 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -106,6 +106,10 @@
#include <glib.h>
#endif
+#ifdef ENABLE_SYSTEMD_DAEMON
+#include <systemd/sd-daemon.h>
+#endif
+
#include <stdlib.h>
#ifdef HAVE_LOCALE_H
@@ -662,6 +666,10 @@ static int mpd_main_after_fork(struct options options)
a huge value to allow the kernel to reduce CPU wakeups */
SetThreadTimerSlackMS(100);
+#ifdef ENABLE_SYSTEMD_DAEMON
+ sd_notify(0, "READY=1");
+#endif
+
/* run the main loop */
instance->event_loop->Run();