32 lines
720 B
Plaintext
32 lines
720 B
Plaintext
|
#!/sbin/runscript
|
||
|
# Copyright 1999-2008 Gentoo Foundation
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
# $Header: $
|
||
|
|
||
|
INDEXERCONFIG=/etc/zarafa/indexer.cfg
|
||
|
INDEXERPROGRAM=/usr/bin/zarafa-indexer
|
||
|
|
||
|
[ -x $INDEXERPROGRAM ] || exit 0
|
||
|
|
||
|
INDEXERCONFIG_OPT=""
|
||
|
[ ! -z $INDEXERCONFIG -a -f $INDEXERCONFIG ] && INDEXERCONFIG_OPT="-c $INDEXERCONFIG"
|
||
|
|
||
|
PIDFILE=/var/run/"${SVCNAME}".pid
|
||
|
|
||
|
start() {
|
||
|
ebegin "Starting ${SVCNAME}"
|
||
|
start-stop-daemon --start \
|
||
|
--pidfile ${PIDFILE} \
|
||
|
--exec ${INDEXERPROGRAM} -- ${INDEXERCONFIG_OPT}
|
||
|
eend $?
|
||
|
}
|
||
|
|
||
|
stop() {
|
||
|
ebegin "Stopping ${SVCNAME}"
|
||
|
start-stop-daemon --stop \
|
||
|
--pidfile ${PIDFILE} \
|
||
|
--retry 65 \
|
||
|
--exec ${INDEXERPROGRAM} -- ${INDEXERCONFIG_OPT}
|
||
|
eend $?
|
||
|
}
|