diff options
author | Martin Holzer <mholzer@gentoo.org> | 2003-11-19 17:06:41 +0000 |
---|---|---|
committer | Martin Holzer <mholzer@gentoo.org> | 2003-11-19 17:06:41 +0000 |
commit | c2cea4faf98327f630a506a37965015b5375d8ef (patch) | |
tree | e70861bb5a1290927cc78b878b24c6eae9cc2eed /media-sound/mpd | |
parent | more cleanups (diff) | |
download | gentoo-2-c2cea4faf98327f630a506a37965015b5375d8ef.tar.gz gentoo-2-c2cea4faf98327f630a506a37965015b5375d8ef.tar.bz2 gentoo-2-c2cea4faf98327f630a506a37965015b5375d8ef.zip |
adding init script.
Diffstat (limited to 'media-sound/mpd')
-rw-r--r-- | media-sound/mpd/ChangeLog | 6 | ||||
-rw-r--r-- | media-sound/mpd/Manifest | 6 | ||||
-rw-r--r-- | media-sound/mpd/files/mpd.conf | 8 | ||||
-rw-r--r-- | media-sound/mpd/files/mpd.rc6 | 42 | ||||
-rw-r--r-- | media-sound/mpd/mpd-0.9.3.ebuild | 7 |
5 files changed, 65 insertions, 4 deletions
diff --git a/media-sound/mpd/ChangeLog b/media-sound/mpd/ChangeLog index 0510bf140ad5..9b79aa5abd44 100644 --- a/media-sound/mpd/ChangeLog +++ b/media-sound/mpd/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-sound/mpd # Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/ChangeLog,v 1.8 2003/10/31 14:17:25 mholzer Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/ChangeLog,v 1.9 2003/11/19 17:06:35 mholzer Exp $ + + 19 Nov 2003; Martin Holzer <mholzer@gentoo.org> mpd-0.9.3.ebuild, + files/mpd.conf, files/mpd.rc6: + adding init script. submitted by Nikl <gentoo-bugzilla@nikl.net> in #26513. *mpd-0.9.3 (31 Oct 2003) diff --git a/media-sound/mpd/Manifest b/media-sound/mpd/Manifest index d394db314f8d..e06dec4fc8f6 100644 --- a/media-sound/mpd/Manifest +++ b/media-sound/mpd/Manifest @@ -1,6 +1,8 @@ -MD5 82732d685b79d91f33c7fdec9cadf287 ChangeLog 1400 +MD5 5fb626bb31fce06423c51e3c2be6dd28 ChangeLog 1580 MD5 ab5e6f092e72a5e37250d833a4b574f1 mpd-0.9.2.ebuild 1189 -MD5 ee2e705692bd3c3841883d21106a80b2 mpd-0.9.3.ebuild 1189 +MD5 9173f58071b073cd39466ea2821ad6fa mpd-0.9.3.ebuild 1297 MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158 +MD5 cf61965ae8a57bd5520da8228bfd6e3b files/mpd.rc6 819 +MD5 621f975dad77dfc05c74fd1310e0daa2 files/mpd.conf 161 MD5 92faee86ed7d721d2df12ac46f428e3f files/digest-mpd-0.9.2 62 MD5 5ec1ddd9cb2bfcd72144ade921e92e6f files/digest-mpd-0.9.3 62 diff --git a/media-sound/mpd/files/mpd.conf b/media-sound/mpd/files/mpd.conf new file mode 100644 index 000000000000..a82bb1c6332c --- /dev/null +++ b/media-sound/mpd/files/mpd.conf @@ -0,0 +1,8 @@ +#CONFIG-FILE for /etc/init.d/mpd + +# the required parameters +PORT="2100" +MUSIC_DIR="" +PLAYLIST_DIR="" +LOG_FILE="/var/log/mpd.log" +ERROR_FILE="/var/log/mpd.error" diff --git a/media-sound/mpd/files/mpd.rc6 b/media-sound/mpd/files/mpd.rc6 new file mode 100644 index 000000000000..f9e0983ad364 --- /dev/null +++ b/media-sound/mpd/files/mpd.rc6 @@ -0,0 +1,42 @@ +#!/sbin/runscript +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: + +depend() { + need localmount +} + +checkconfig() { + if [ -z "$PORT" ] || \ + [ -z "$MUSIC_DIR" ] || \ + [ -z "$PLAYLIST_DIR" ] || \ + [ -z "$LOG_FILE" ] || \ + [ -z "$ERROR_FILE" ] + then + eerror "You need to set PORT, MUSIC_DIR, PLAYLIST_DIR," + eerror " LOG_FILE and ERROR_FILE in /etc/conf.d/mpd" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting Music Player Daemon" + + /usr/bin/mpd ${PORT} \ + ${MUSIC_DIR} \ + ${PLAYLIST_DIR} \ + ${LOG_FILE} \ + ${ERROR_FILE} + + eend $? +} + +stop() { + ebegin "Stopping Music Player Daemon" + + killall mpd &>/dev/null + + eend $? +} diff --git a/media-sound/mpd/mpd-0.9.3.ebuild b/media-sound/mpd/mpd-0.9.3.ebuild index ed3824a8c5eb..bf2a0bf7d52b 100644 --- a/media-sound/mpd/mpd-0.9.3.ebuild +++ b/media-sound/mpd/mpd-0.9.3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.9.3.ebuild,v 1.1 2003/10/31 14:17:25 mholzer Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.9.3.ebuild,v 1.2 2003/11/19 17:06:35 mholzer Exp $ IUSE="oggvorbis mad" @@ -38,6 +38,11 @@ src_install() { rm -rf ${D}/usr/share/doc/mpd/ dodoc COPYING ChangeLog INSTALL README TODO UPGRADING dodoc doc/COMMANDS doc/mpdconf.example + + exeinto /etc/init.d + newexe ${FILESDIR}/mpd.rc6 mpd + insinto /etc/conf.d + newins ${FILESDIR}/mpd.conf mpd } pkg_postinst() { |