35 lines
737 B
Plaintext
35 lines
737 B
Plaintext
#!/sbin/runscript
|
|
# Copyright 1999-2013 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: $
|
|
|
|
SEARCHCONFIG=/etc/zarafa/search.cfg
|
|
SEARCHPROGRAM=/usr/bin/zarafa-search
|
|
|
|
[ -x $SEARCHPROGRAM ] || exit 0
|
|
|
|
SEARCHCONFIG_OPT=""
|
|
[ ! -z $SEARCHCONFIG -a -f $SEARCHCONFIG ] && SEARCHCONFIG_OPT="-c $SEARCHCONFIG"
|
|
|
|
PIDFILE=/var/run/"${SVCNAME}".pid
|
|
|
|
depend() {
|
|
need zarafa-server
|
|
}
|
|
|
|
start() {
|
|
ebegin "Starting ${SVCNAME}"
|
|
start-stop-daemon --start \
|
|
--pidfile ${PIDFILE} \
|
|
--exec ${SEARCHPROGRAM} -- ${SEARCH_OPT} ${SEARCH_OPTIONS}
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping ${SVCNAME}"
|
|
start-stop-daemon --stop \
|
|
--pidfile ${PIDFILE} \
|
|
--exec ${SEARCHPROGRAM} -- ${SEARCHCONFIG_OPT}
|
|
eend $?
|
|
}
|