19
0
Fork 0

Exemple de script pour reinstaller les plugins

This commit is contained in:
jlecour 2018-02-09 10:11:59 +01:00
parent 43da24c07b
commit 5d1bc782fd
1 changed files with 23 additions and 0 deletions

View File

@ -402,6 +402,29 @@ analysis-phonetic
java.lang.IllegalArgumentException: plugin [analysis-phonetic] is incompatible with version [5.6.3]; was designed for version [5.6.2]
~~~
On peut utiliser ce script pour automatiser la mise à jour de tous les plugins et le redémarrage d'Elasticsearch :
~~~{.bash}
#!/bin/bash
set -e
set -u
PLUGIN_BIN=/usr/share/elasticsearch/bin/elasticsearch-plugin
NEED_RESTART=""
for plugin in $(${PLUGIN_BIN} list); do
"${PLUGIN_BIN}" remove "${plugin}"
"${PLUGIN_BIN}" install "${plugin}"
NEED_RESTART="1"
done
if [ -n "${NEED_RESTART}" ]; then
systemctl restart elasticsearch
fi
exit 0
~~~
## Principe de fonctionnement d'Elasticsearch