prefix-ize contrib startup scripts, closing ticket #77

This commit is contained in:
Ron Pedde 2006-05-01 08:29:07 +00:00
parent 5b89f07caa
commit ba5534a02b
4 changed files with 24 additions and 6 deletions

View File

@ -1 +1,19 @@
EXTRA_DIST=mt-daapd-fedora mt-daapd-gentoo mtdaapd-bsd
EXTRA_DIST=mt-daapd-fedora.templ mt-daapd-gentoo.templ mtdaapd-bsd.templ
BUILT_SOURCES = mt-daapd-fedora mt-daapd-gentoo mtdaapd-bsd
mt-daapd-fedora: mt-daapd-fedora.templ ../../config.h
sed -e s,[@]prefix[@],$(prefix),g mt-daapd-fedora.templ >$@; \
chmod +x $@
mt-daapd-gentoo: mt-daapd-gentoo.templ ../../config.h
sed -e s,[@]prefix[@],$(prefix),g mt-daapd-gentoo.templ >$@; \
chmod +x $@
mtdaapd-bsd: mtdaapd-bsd.templ ../../config.h
sed -e s,[@]prefix[@],$(prefix),g mtdaapd-bsd.templ >$@; \
chmod +x $@

View File

@ -8,13 +8,13 @@
# source function library
. /etc/init.d/functions
[ -e /etc/daapd.conf ]
[ -e @prefix@/etc/daapd.conf ]
RETVAL=0
start() {
echo -n $"Starting DAAP server: "
daemon mt-daapd
daemon @prefix@/sbin/mt-daapd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/mt-daapd

View File

@ -24,14 +24,14 @@ depend() {
# 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
start-stop-daemon --start --quiet --exec @prefix@/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
# start-stop-daemon --stop --quiet --exec @prefix@/sbin/mt-daapd
# I dunno if this works... try it:
start-stop-daemon --stop --quiet --pidfile /var/run/mt-daapd.pid --signal 2
eend $?

View File

@ -13,7 +13,7 @@
name="mtdaapd"
realname="mt-daapd"
rcvar=$name
command="/usr/local/bin/${realname}"
command="@prefix@/bin/${realname}"
pidfile="/var/run/${realname}.pid"
sig_stop="SIGINT"