sh solr-provision.sh

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh solr-provision.sh相关的知识,希望对你有一定的参考价值。

#!/bin/bash
#
# Post-provisioning script to configure solr locally with Acquia Cloud config.
#
# This script configures the default Apache Solr search core to use one of the
# Drupal Solr module's configurations. This shell script presumes you have
# `solr` in the `installed_extras`, and is currently set up for the D8 version
# of Search API Solr. Note
 
SOLR_SETUP_COMPLETE_FILE=/etc/drupal_vm_local_solr_config_complete
 
# Search API Solr module.
SOLR_DOWNLOAD=https://ftp.drupal.org/files/projects/search_api_solr-8.x-1.2.tar.gz
SOLR_DOWNLOAD_DIR=/tmp
SOLR_MODULE_NAME=search_api_solr
 
# 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 the Solr configuration into place over the default `collection1` core.
  sudo cp -a $SOLR_DOWNLOAD_DIR/$SOLR_MODULE_NAME/solr-conf/4.x/. /var/solr/collection1/conf/
 
  # Adjust the autoCommit time so index changes are committed in 1s.
  sudo sed -i 's/\(<maxTime>\)\([^<]*\)\(<[^>]*\)/\11000\3/g' /var/solr/collection1/conf/solrconfig.xml
 
  # Fix file permissions.
  sudo chown -R solr:solr /var/solr/collection1/conf
 
  # Restart Apache Solr.
  sudo service solr restart
 
  # Create a file to indicate this script has already run.
  sudo touch $SOLR_SETUP_COMPLETE_FILE
else
  exit 0
fi

以上是关于sh solr-provision.sh的主要内容,如果未能解决你的问题,请参考以下文章

如何使我的命令行在具有扩展名(.sh)和名称如“weird.sh.sh.sh”的文件上工作

sh sh_template.sh

sh sh.sh

Linux下面如何运行 SH文件

配置告警系统主脚本main.sh mon.sh load.sh 502.sh disk.sh

shell 脚本各种执行方式(source ./*.sh, . ./*.sh, ./*.sh)的区别