Skip to content

Apache Lucene open-source search software

SOLR-6993: install_solr_service.sh won't install on RHEL / CentOS

Timothy Pottereb23901230c7
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index d593eeac9c9..bf3d2a6da57 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -512,6 +512,9 @@ Bug Fixes
* SOLR-7004: Add a missing constructor for CollectionAdminRequest.BalanceShardUnique that
sets the collection action. (Anshum Gupta)
+* SOLR-6993: install_solr_service.sh won't install on RHEL / CentOS
+ (David Anderson via Timothy Potter)
+
Optimizations
----------------------
diff --git a/solr/bin/install_solr_service.sh b/solr/bin/install_solr_service.sh
index f5fab2f7740..57a0264482d 100644
--- a/solr/bin/install_solr_service.sh
+++ b/solr/bin/install_solr_service.sh
@@ -84,9 +84,9 @@ fi
SOLR_INSTALL_FILE=${SOLR_ARCHIVE##*/}
is_tar=true
if [ ${SOLR_INSTALL_FILE: -4} == ".tgz" ]; then
- SOLR_DIR=${SOLR_INSTALL_FILE:0:-4}
+ SOLR_DIR=${SOLR_INSTALL_FILE%.tgz}
elif [ ${SOLR_INSTALL_FILE: -4} == ".zip" ]; then
- SOLR_DIR=${SOLR_INSTALL_FILE:0:-4}
+ SOLR_DIR=${SOLR_INSTALL_FILE%.zip}
is_tar=false
else
print_usage "Solr installation archive $SOLR_ARCHIVE is invalid, expected a .tgz or .zip file!"