Skip to content

Commit

Permalink
delete old es index if mapper attachments plugin is found
Browse files Browse the repository at this point in the history
  • Loading branch information
monotek committed Mar 14, 2018
1 parent e7c6f74 commit 15a280b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .pkgr.yml
Expand Up @@ -5,27 +5,32 @@ notifications: false
targets:
centos-7:
dependencies:
- curl
- elasticsearch
- nginx
- postgresql-server
- which
debian-8:
dependencies:
- curl
- elasticsearch
- nginx|apache2
- postgresql|mysql-server|mariadb-server|sqlite
debian-9:
dependencies:
- curl
- elasticsearch
- nginx|apache2
- postgresql|mariadb-server|sqlite
ubuntu-16.04:
dependencies:
- curl
- elasticsearch
- nginx|apache2
- postgresql|mysql-server|mariadb-server|sqlite
sles-12:
dependencies:
- curl
- elasticsearch
- nginx
- postgresql-server
Expand Down
5 changes: 5 additions & 0 deletions contrib/packager.io/functions
Expand Up @@ -230,7 +230,12 @@ function setup_elasticsearch () {

if [ -n "$(/usr/share/elasticsearch/bin/elasticsearch-plugin list | grep mapper-attachments)" ]; then
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

elif [ -n "$(/usr/share/elasticsearch/bin/elasticsearch-plugin list | grep ingest-attachment)" ]; then
yes | /usr/share/elasticsearch/bin/elasticsearch-plugin -s remove ingest-attachment
fi
Expand Down

0 comments on commit 15a280b

Please sign in to comment.