Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
PR geerlingguy#1134 follow-up: Use instead of .
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy authored and kekkis committed Feb 23, 2017
1 parent aa8d8b7 commit f983a49
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/scripts/configure-solr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
# `solr` in the `installed_extras`, and is currently set up for the D7 versions
# of Apache Solr Search or Search API Solr.

NAME="d8"
SOLR_SETUP_COMPLETE_FILE="/etc/drupal_vm_solr_config_complete_$NAME"
SOLR_CORE_NAME="d8"
SOLR_SETUP_COMPLETE_FILE="/etc/drupal_vm_solr_config_complete_$SOLR_CORE_NAME"

# Search API Solr module.
SOLR_DOWNLOAD="http://ftp.drupal.org/files/projects/search_api_solr-8.x-1.x-dev.tar.gz"
SOLR_DOWNLOAD_DIR="/tmp"
SOLR_MODULE_NAME="search_api_solr"
SOLR_VERSION="5.x"
SOLR_CORE_PATH="/var/solr/data/$NAME"
SOLR_CORE_PATH="/var/solr/data/$SOLR_CORE_NAME"

# Check to see if we've already performed this setup.
if [ ! -e "$SOLR_SETUP_COMPLETE_FILE" ]; then
# Download and expand the Solr module.
wget -qO- $SOLR_DOWNLOAD | tar xvz -C $SOLR_DOWNLOAD_DIR

# Copy new Solr collection core with the Solr configuration provided by module.
sudo su - solr -c "/opt/solr/bin/solr create -c $NAME -d $SOLR_DOWNLOAD_DIR/$SOLR_MODULE_NAME/solr-conf/$SOLR_VERSION/"
sudo su - solr -c "/opt/solr/bin/solr create -c $SOLR_CORE_NAME -d $SOLR_DOWNLOAD_DIR/$SOLR_MODULE_NAME/solr-conf/$SOLR_VERSION/"

# Adjust the autoCommit time so index changes are committed in 1s.
sudo sed -i 's/\(<maxTime>\)\([^<]*\)\(<[^>]*\)/\11000\3/g' $SOLR_CORE_PATH/conf/solrconfig.xml
Expand Down

0 comments on commit f983a49

Please sign in to comment.