Closed petronny closed 8 years ago
Just pushed 11b436d32299c71cc0828faff66c66a921842a05 to branch systemd
.
Not sure if it changes anything for you, though. Want to give it a try?
When did this start to break? Did it work reliable before?
Thank you but I still get Connection refused
after updated to 11b436d .
My workaround is create a script to delay 3 seconds, then run mpd-notification.
#!/bin/sh
sleep 3
/usr/bin/mpd-notification
After=mpd.service
...
ExecStart=/somewhere/to/the/script.sh
Of course it is a little ugly... How about creating a loop to connect to the server every period time in mpd-notification.c?
Forced sleep times and connecting in loop are really ugly workarounds. Usually systemd
should get this right, otherwise the software (mpd
in this case) is broken.
Let's try something different. Could you please edit /usr/lib/systemd/user/mpd.service
and add a line
Type=forking
and change the ExecStart=
line to
ExecStart=/usr/bin/mpd
The complete file should look something like this:
[Unit]
Description=Music Player Daemon
After=network.target sound.target
[Service]
Type=forking
ExecStart=/usr/bin/mpd
# allow MPD to use real-time priority 50
LimitRTPRIO=50
LimitRTTIME=infinity
[Install]
WantedBy=default.target
Ah, this will not (yet) work... It needs another commit at compile time: Main: notify systemd when MPD is ready
Ok, let's use a workaround until real fixes linked above make its way into a release.
Can you try branch systemd
with 67c75e3155104e7208171be8c5bac5d01fcb063f?
Closed with 67c75e3155104e7208171be8c5bac5d01fcb063f.
I reverted this in master, should just work with mpd
version 0.20 now. Can you give it a try?
Hi, I'm using Archlinux and have installed mpd and mpd-notification-git. Then I want them both to run automatically on boot.
But these command doesn't work. Here is the log of mpd-notification:
And the log of mpd:
Then referring to Archlinux Wiki, I add both
Requires=mpd.service
andAfter=mpd.service
to the [Unit] section of mpd-notification.service. But mpd-notification still start before mpd opening its port. Maybe we need a script to delay a few seconds.