summaryrefslogtreecommitdiffstats
path: root/mpd-notification.c
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2017-01-05 16:17:04 +0100
committerGravatar Christian Hesse <mail@eworm.de>2017-01-05 16:17:04 +0100
commit6d9d889371a4c1852f12b2625ebff75fce033a8d (patch)
treecb8c1061e61c1a543e4a4ea873360c60e49bdb67 /mpd-notification.c
parentb27f35fa84f987e1f8d93f0318c926ba50ad7375 (diff)
downloadmpd-notification-6d9d889371a4c1852f12b2625ebff75fce033a8d.tar.gz
mpd-notification-6d9d889371a4c1852f12b2625ebff75fce033a8d.tar.zst
use systemd service manager notification
Diffstat (limited to 'mpd-notification.c')
-rw-r--r--mpd-notification.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mpd-notification.c b/mpd-notification.c
index 4475b66..f37c219 100644
--- a/mpd-notification.c
+++ b/mpd-notification.c
@@ -379,6 +379,9 @@ int main(int argc, char ** argv) {
signal(SIGTERM, received_signal);
signal(SIGUSR1, received_signal);
+ /* report ready to systemd */
+ sd_notify(0, "READY=1\nSTATUS=Waiting for mpd event...");
+
while (doexit == 0 && mpd_run_idle_mask(conn, MPD_IDLE_PLAYER)) {
mpd_command_list_begin(conn, true);
mpd_send_status(conn);