Skip to content

Instantly share code, notes, and snippets.

@lstellway
Created September 27, 2018 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lstellway/1568638e0f7fdb34ffffff744a5f4600 to your computer and use it in GitHub Desktop.
Save lstellway/1568638e0f7fdb34ffffff744a5f4600 to your computer and use it in GitHub Desktop.
#!/bin/bash
run()
{
/usr/share/elasticsearch/bin/elasticsearch-plugin $1
}
init()
{
# Get installed plugins
PLUGINS=`run "list"`
# Remove Plugins
for i in $PLUGINS
do
run "remove ${i}"
done
# Install Plugins
for i in $PLUGINS
do
run "install ${i}"
done
systemctl restart elasticsearch
systemctl status elasticsearch
}
init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment