2017-03-21 11:40:10 +01:00
|
|
|
#!/sbin/openrc-run
|
2015-05-06 08:39:19 +02:00
|
|
|
# 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"
|
2015-05-06 08:39:19 +02:00
|
|
|
|
|
|
|
command="/bin/solr"
|
2015-05-06 10:14:21 +02:00
|
|
|
command_args="start -p ${SOLR_PORT:-8983} ${SOLR_OPTS}"
|
|
|
|
|
|
|
|
extra_commands="status"
|
2015-05-06 08:39:19 +02:00
|
|
|
|
|
|
|
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
|
2015-05-06 08:39:19 +02:00
|
|
|
}
|