alpha-quadrant/www-apps/solr/files/solr.init.d

35 lines
591 B
D
Raw Normal View History

2017-03-21 11:40:10 +01:00
#!/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"
2015-05-06 10:14:21 +02:00
pidfile="/run/solr/solr-${SOLR_PORT:-8983}.pid"
command="/bin/solr"
2015-05-06 10:14:21 +02:00
command_args="start -p ${SOLR_PORT:-8983} ${SOLR_OPTS}"
extra_commands="status"
depend() {
need net
use logger
}
start_pre() {
2015-05-06 10:14:21 +02:00
rm -rf ${SOLR_TMPDIR}
mkdir ${SOLR_TMPDIR}
chown solr:solr ${SOLR_TMPDIR}
2017-03-21 13:00:59 +01:00
mkdir /run/solr
chown solr:solr /run/solr
export SOLR_LOGS_DIR
2015-05-06 10:14:21 +02:00
}
status() {
/bin/solr status
}
stop() {
/bin/solr stop
}