From 45fe1b5c81d60266c594a366dc3f04bb79e8cbdb Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Fri, 12 Nov 2004 08:00:28 +0000 Subject: [PATCH] rc script for gentoo from discobob@users.sourceforge.net --- CREDITS | 3 +++ contrib/Makefile.am | 2 +- contrib/mt-daapd-gentoo | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100755 contrib/mt-daapd-gentoo diff --git a/CREDITS b/CREDITS index 07146604..3e434b56 100644 --- a/CREDITS +++ b/CREDITS @@ -46,3 +46,6 @@ Paul Kim (mrpickles@users.sourceforge.net) Stephen Lee (slee@nis.net) * Patches for proper url decoding +Rob Nunn (discobob@users.sourceforge.net) + * gentoo rc script + diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 288bee1e..5f87c2f7 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -1,6 +1,6 @@ # $Id$ # -EXTRA_DIST = README mt-daapd.spec mt-daapd.conf mt-daapd.playlist mt-daapd +EXTRA_DIST = README mt-daapd.spec mt-daapd.conf mt-daapd.playlist mt-daapd mt-daapd-gentoo diff --git a/contrib/mt-daapd-gentoo b/contrib/mt-daapd-gentoo new file mode 100755 index 00000000..fbbfc7a3 --- /dev/null +++ b/contrib/mt-daapd-gentoo @@ -0,0 +1,36 @@ +#!/sbin/runscript +# +# description: mt-daapd is a multi-threaded DAAP server for iTunes +# processname: mt-daapd +# Init script to start/stop mt-daapd for Gentoo Linux 2004.2 +# +# This file needs to be in your /etc/init.d directory. +# To start mt-daapd, type "/etc/init.d/mt-daapd start" +# To stop it, type "/etc/init.d/mt-daapd stop" +# To start it automagically, type "rc-update add mt-daapd default" +# +# +# rob@robnunn.com (31st July 2004) + +depend() { + # not much point having the daemon without a network + need net + # and if this goes according to plan, we provide daap + provide daap +} + +# start the mt-daapd daemon. All fairly self-explanatory. +# lock files aren't necessary (as far as i can tell) since gentoo +# won't let us run multiple copies. +start() { + ebegin "Starting mt-daapd DAAP server" + start-stop-daemon --start --quiet --exec /usr/local/sbin/mt-daapd + eend $? +} + +# stop the daemon +stop() { + ebegin "Stopping mt-daapd DAAP server" + start-stop-daemon --stop --quiet --exec /usr/local/sbin/mt-daapd + eend $? +}