Files
growstuff/script/install_elasticsearch.sh
2018-09-09 13:33:20 +12:00

15 lines
519 B
Bash
Executable File

#!/bin/bash
if [ "${GROWSTUFF_ELASTICSEARCH}" = "true" ]; then
[[ -z "$VERSION" ]] && VERSION="6.2.3"
set -euv
sudo dpkg -r elasticsearch
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${VERSION}.deb
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${VERSION}.deb.sha512
shasum -a 512 -c elasticsearch-${VERSION}.deb.sha512
sudo dpkg -i --force-confnew elasticsearch-${VERSION}.deb
sudo service elasticsearch start
sleep 10
curl -v localhost:9200
fi