alpha-quadrant/www-apps/solr/files/solr.init.d
2017-03-21 13:00:59 +01:00

35 lines
591 B
D
Executable File

#!/sbin/openrc-run
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
start_stop_daemon_args="-u solr:solr"
pidfile="/run/solr/solr-${SOLR_PORT:-8983}.pid"
command="/bin/solr"
command_args="start -p ${SOLR_PORT:-8983} ${SOLR_OPTS}"
extra_commands="status"
depend() {
need net
use logger
}
start_pre() {
rm -rf ${SOLR_TMPDIR}
mkdir ${SOLR_TMPDIR}
chown solr:solr ${SOLR_TMPDIR}
mkdir /run/solr
chown solr:solr /run/solr
export SOLR_LOGS_DIR
}
status() {
/bin/solr status
}
stop() {
/bin/solr stop
}