aboutsummaryrefslogtreecommitdiffstats
path: root/systemd/mpd-notification.service
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2016-10-04 12:55:01 +0200
committerGravatar Christian Hesse <mail@eworm.de>2016-10-04 12:55:01 +0200
commitf78ed9ff07fa6f0e7b0e306d31bea29aa699249c (patch)
tree38532094fce9039f7b576ec677530302d162a6b0 /systemd/mpd-notification.service
parent5db1e994b71c5a88fda8b6a540e8acdbd2c78ccd (diff)
parent67c75e3155104e7208171be8c5bac5d01fcb063f (diff)
downloadmpd-notification-f78ed9ff07fa6f0e7b0e306d31bea29aa699249c.tar.gz
mpd-notification-f78ed9ff07fa6f0e7b0e306d31bea29aa699249c.tar.zst
Merge branch 'systemd'
Diffstat (limited to 'systemd/mpd-notification.service')
-rw-r--r--systemd/mpd-notification.service14
1 files changed, 13 insertions, 1 deletions
diff --git a/systemd/mpd-notification.service b/systemd/mpd-notification.service
index c377c90..ab9e265 100644
--- a/systemd/mpd-notification.service
+++ b/systemd/mpd-notification.service
@@ -1,9 +1,21 @@
[Unit]
Description=MPD Notification
-Requires=mpd.service
+# Do not require any service here! We do rely on mpd OR network (for
+# a remote mpd instance). So let the user care.
+# We want to order after, though. This makes sure the resource is
+# available on start and mpd-notification can cleanly disconnect on
+# system shutdown.
+After=mpd.service network.target network-online.target
[Service]
Type=simple
+# Using mpd user service can result in mpd-notification starting too early
+# as systemd thinks mpd has finished initialization but socket is not yet
+# available. So sleep for a second before starting.
+# TODO: Remove workarount when upstream fix is released. Currently in git:
+# http://git.musicpd.org/cgit/master/mpd.git/commit/?id=7b575f61
+# http://git.musicpd.org/cgit/master/mpd.git/commit/?id=c85ba733
+ExecStartPre=/usr/bin/sleep 1
ExecStart=/usr/bin/mpd-notification
[Install]