Skip to content

Instantly share code, notes, and snippets.

@stof
Last active September 19, 2018 15:25
Show Gist options
  • Save stof/9fc74662a4a50a6c1e67a996c7debb2c to your computer and use it in GitHub Desktop.
Save stof/9fc74662a4a50a6c1e67a996c7debb2c to your computer and use it in GitHub Desktop.
Reinstall ElasticSearch plugins easily
#!/usr/bin/env bash
# fail hard
set -o pipefail
# fail harder
set -eu
# update this list with the ES core plugins needing to be reinstalled.
PLUGINS="ingest-attachment analysis-icu"
for plugin in $PLUGINS
do
/usr/share/elasticsearch/bin/elasticsearch-plugin remove "$plugin"
done
for plugin in $PLUGINS
do
/usr/share/elasticsearch/bin/elasticsearch-plugin install "$plugin"
done
service elasticsearch restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment