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 # source function library
. /etc/init.d/functions . /etc/init.d/functions
[ -e /etc/daapd.conf ] [ -e @prefix@/etc/daapd.conf ]
RETVAL=0 RETVAL=0
start() { start() {
echo -n $"Starting DAAP server: " echo -n $"Starting DAAP server: "
daemon mt-daapd daemon @prefix@/sbin/mt-daapd
RETVAL=$? RETVAL=$?
echo echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/mt-daapd [ $RETVAL -eq 0 ] && touch /var/lock/subsys/mt-daapd

View File

@ -24,14 +24,14 @@ depend() {
# won't let us run multiple copies. # won't let us run multiple copies.
start() { start() {
ebegin "Starting mt-daapd DAAP server" 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 $? eend $?
} }
# stop the daemon # stop the daemon
stop() { stop() {
ebegin "Stopping mt-daapd DAAP server" 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: # I dunno if this works... try it:
start-stop-daemon --stop --quiet --pidfile /var/run/mt-daapd.pid --signal 2 start-stop-daemon --stop --quiet --pidfile /var/run/mt-daapd.pid --signal 2
eend $? eend $?

View File

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