delete old es index if mapper attachments plugin is found
This commit is contained in:
parent
e7c6f7413c
commit
15a280b449
2 changed files with 10 additions and 0 deletions
|
@ -5,27 +5,32 @@ notifications: false
|
||||||
targets:
|
targets:
|
||||||
centos-7:
|
centos-7:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
- curl
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
- nginx
|
- nginx
|
||||||
- postgresql-server
|
- postgresql-server
|
||||||
- which
|
- which
|
||||||
debian-8:
|
debian-8:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
- curl
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
- nginx|apache2
|
- nginx|apache2
|
||||||
- postgresql|mysql-server|mariadb-server|sqlite
|
- postgresql|mysql-server|mariadb-server|sqlite
|
||||||
debian-9:
|
debian-9:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
- curl
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
- nginx|apache2
|
- nginx|apache2
|
||||||
- postgresql|mariadb-server|sqlite
|
- postgresql|mariadb-server|sqlite
|
||||||
ubuntu-16.04:
|
ubuntu-16.04:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
- curl
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
- nginx|apache2
|
- nginx|apache2
|
||||||
- postgresql|mysql-server|mariadb-server|sqlite
|
- postgresql|mysql-server|mariadb-server|sqlite
|
||||||
sles-12:
|
sles-12:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
- curl
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
- nginx
|
- nginx
|
||||||
- postgresql-server
|
- postgresql-server
|
||||||
|
|
|
@ -230,7 +230,12 @@ function setup_elasticsearch () {
|
||||||
|
|
||||||
if [ -n "$(/usr/share/elasticsearch/bin/elasticsearch-plugin list | grep mapper-attachments)" ]; then
|
if [ -n "$(/usr/share/elasticsearch/bin/elasticsearch-plugin list | grep mapper-attachments)" ]; then
|
||||||
REBUILD_ES_SEARCHINDEX="yes"
|
REBUILD_ES_SEARCHINDEX="yes"
|
||||||
|
|
||||||
|
echo "# Deleting old zammad_production elasticsearch index..."
|
||||||
|
curl -XDELETE '127.0.0.1:9200/zammad_production'
|
||||||
|
|
||||||
yes | /usr/share/elasticsearch/bin/elasticsearch-plugin -s remove mapper-attachments
|
yes | /usr/share/elasticsearch/bin/elasticsearch-plugin -s remove mapper-attachments
|
||||||
|
|
||||||
elif [ -n "$(/usr/share/elasticsearch/bin/elasticsearch-plugin list | grep ingest-attachment)" ]; then
|
elif [ -n "$(/usr/share/elasticsearch/bin/elasticsearch-plugin list | grep ingest-attachment)" ]; then
|
||||||
yes | /usr/share/elasticsearch/bin/elasticsearch-plugin -s remove ingest-attachment
|
yes | /usr/share/elasticsearch/bin/elasticsearch-plugin -s remove ingest-attachment
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue