Created
September 27, 2018 17:52
-
-
Save lstellway/1568638e0f7fdb34ffffff744a5f4600 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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