Apache Lucene open-source search software
SOLR-6851: Set the SOLR_VAR_DIR using the SOLR_SERVICE variable, thus alleviating the need to specify the -d option when overrding the service name with -s
Timothy Potteraba932e403af
diff --git a/solr/bin/install_solr_service.sh b/solr/bin/install_solr_service.shindex 8a6d91b9c3d..f5fab2f7740 100644--- a/solr/bin/install_solr_service.sh+++ b/solr/bin/install_solr_service.sh@@ -166,24 +166,24 @@ if [ ! -d "$SOLR_EXTRACT_DIR" ]; thenexit 1fi+if [ -z "$SOLR_SERVICE" ]; then+ SOLR_SERVICE=solr+fi+if [ -z "$SOLR_VAR_DIR" ]; then- SOLR_VAR_DIR=/var/solr+ SOLR_VAR_DIR=/var/$SOLR_SERVICEfiif [ -z "$SOLR_USER" ]; thenSOLR_USER=solrfi-if [ -z "$SOLR_SERVICE" ]; then- SOLR_SERVICE=solr-fi-if [ -z "$SOLR_PORT" ]; thenSOLR_PORT=8983fiif [ -f "/etc/init.d/$SOLR_SERVICE" ]; then- echo -e "\nERROR: /etc/init.d/$SOLR_SERVICE already exists! Perhaps solr is already setup as a service on this host?\n" 1>&2+ echo -e "\nERROR: /etc/init.d/$SOLR_SERVICE already exists! Perhaps Solr is already setup as a service on this host?\n" 1>&2exit 1fi