How to autostart ympd using systemd?
taudac opened this issue · 3 comments
taudac commented
What I have done:
sudo cp ~/src/ympd/contrib/ympd.service /usr/lib/systemd/system/
sudo systemctl enable ympd.service
sudo systemctl start ympd.service
Starting ympd fails with:
Job for ympd.service failed. See 'systemctl status ympd.service' and 'journalctl -xn' for details.
systemctl status ympd
returns:
● ympd.service - ympd server daemon Loaded: loaded (/usr/lib/systemd/system/ympd.service; enabled) Active: **failed** (Result: resources)
Note: The platform is Raspberry Pi 2 (kernel: rpi-4.3.y)
3onyc commented
- What distro are you running?
- What's the output of
journalctl -u ympd.service
?
taudac commented
I am running Raspbian Jessie.
I have fixed the issue in the meantime somehow. I have used the following steps (if I recall correctly):
sudo cp contrib/ympd.service /etc/systemd/system/
sudp cp contrib/ympd.default /etc/default/ympd
- ympd has been installed to
/usr/local/bin
, so, in the fileympd.service
, I have changedExecStart=/usr/bin/ympd
toExecStart=/usr/local/bin/ympd
. - To ensure that ympd is started after mpd, I have added
mpd.service
to theAfter
andRequires
options inympd.service
. sudo systemctl daemon-reload
sudo systemctl enable ympd.service
sudo systemctl start ympd.service
Does that make sense?
Shouldn't make install
do something like that?
dewi-ny-je commented
Works for me too, same steps.