mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-24 06:05:56 -05:00
prefix-ize contrib startup scripts, closing ticket #77
This commit is contained in:
parent
5b89f07caa
commit
ba5534a02b
@ -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 $@
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
@ -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 $?
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user