Skip to content

Commit

Permalink
Add Elasticsearch repositories only once to sources.list (#1554)
Browse files Browse the repository at this point in the history
  • Loading branch information
DieterHolvoet committed Nov 28, 2020
1 parent 3f46d8e commit 5fda924
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/features/elasticsearch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ echo "Elasticsearch majorVersion: $majorVersion"
# Install Java & Elasticsearch

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/$majorVersion.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-$majorVersion.x.list

if [ ! -f /etc/apt/sources.list.d/elastic-$majorVersion.x.list ]; then
echo "deb https://artifacts.elastic.co/packages/$majorVersion.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-$majorVersion.x.list
fi

sudo apt-get update
sudo apt-get -y install openjdk-11-jre
Expand Down

0 comments on commit 5fda924

Please sign in to comment.