Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 651330
Collapse All | Expand All

(-)a/media-sound/mpd/files/mpd.logrotate (-7 lines)
Lines 1-7 Link Here
1
/var/lib/mpd/log {
2
	missingok
3
	postrotate
4
	[ -f /var/run/mpd.pid ] && cat /var/run/mpd.pid | xargs /bin/kill -HUP
5
	[ -f /var/lib/mpd/pid ] && cat /var/lib/mpd/pid | xargs /bin/kill -HUP
6
	endscript
7
}
(-)a/media-sound/mpd/files/mpd2.init (-36 lines)
Lines 1-36 Link Here
1
#!/sbin/openrc-run
2
# Copyright 1999-2016 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
4
5
depend() {
6
	need localmount
7
	use net netmount nfsmount alsasound esound pulseaudio
8
}
9
10
checkconfig() {
11
	if ! [ -f /etc/mpd.conf ]; then
12
		eerror "Configuration file /etc/mpd.conf does not exist."
13
		return 1
14
	fi
15
16
	if ! grep -q '^\s*pid_file' /etc/mpd.conf; then
17
		eerror "Invalid configuration: pid_file needs to be set."
18
		return 1
19
	fi
20
21
	return 0
22
}
23
24
start() {
25
	checkconfig || return 1
26
27
	ebegin "Starting Music Player Daemon"
28
	start-stop-daemon --start --quiet --exec /usr/bin/mpd -- /etc/mpd.conf 2>/dev/null
29
	eend $?
30
}
31
32
stop() {
33
	ebegin "Stopping Music Player Daemon"
34
	/usr/bin/mpd --kill
35
	eend $?
36
}

Return to bug 651330