Starting freshly compiled MPD as a service

Discuss client development (or even MPD development if you feel so inclined), ask questions about the client libs, MPD feature requests from client developers, etc...
Post Reply
hansheijmans
Posts: 4
Joined: May 8th, 2015, 2:47 pm

Starting freshly compiled MPD as a service

Post by hansheijmans » May 8th, 2015, 3:03 pm

Hello,

Just compiled 0.19.9 on my raspberry pi 2 (running raspbian wheezy) but couldn't get MPD to run automatically as a service. Before a executed "sudo make install" I uninstalled the present version 0.16. After that I tried "sudo service mpd enable" and "sudo service mpd start", both not creating any output and the latter not starting anything.

I also tried running mpd manually but it complained about not able to find configuration file (however, there is a mpd.conf present in /etc). so tried "sudo mpd /etc/mpd.conf" which finally loaded mpd but started complaining about the database file.

Does anyone have some tips and tricks to start mpd as a service?

Thanks!

Hans.

max
Forum team
Posts: 942
Joined: January 15th, 2013, 3:43 pm

Re: Starting freshly compiled MPD as a service

Post by max » May 8th, 2015, 6:22 pm

You need to write an init script that launches MPD. The Debian package you uninstalled has one; you can easily re-install it and add the line "DAEMON=/usr/local/bin/mpd" to /etc/default/mpd and then the init script will launch the MPD instance you installed in /usr/local instead of the one that came with the Debian package.

hansheijmans
Posts: 4
Joined: May 8th, 2015, 2:47 pm

Re: Starting freshly compiled MPD as a service

Post by hansheijmans » May 9th, 2015, 9:58 am

Thanks Max, it worked!!!

I have got only one issue. For some reason mpd cannot play internet radio streams anymore. It reports "MPD reported the following error: No such song". Something I missed during compile time?

Thanks again!

hansheijmans
Posts: 4
Joined: May 8th, 2015, 2:47 pm

Re: Starting freshly compiled MPD as a service

Post by hansheijmans » May 9th, 2015, 1:36 pm

Yet another question...output from ./configure:

Code: Select all

Archive support:
	(+bzip2) (-ISO9660) (-ZIP) 
Which libraries do I need to enable ISO9960 and ZIP options?

BTW: got radio streams working!!

Suggestion: maybe to provide some documentation on which libraries to install for which options? Or maybe I overlooked...?

Post Reply