From ccaaccbe6cd0a403fda340ebfd063512d58a0bb9 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 2 Nov 2021 08:24:35 +0100 Subject: [PATCH] Create 51-elasticsearch --- nextcloud/root/etc/cont-init.d/51-elasticsearch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 nextcloud/root/etc/cont-init.d/51-elasticsearch diff --git a/nextcloud/root/etc/cont-init.d/51-elasticsearch b/nextcloud/root/etc/cont-init.d/51-elasticsearch new file mode 100644 index 000000000..e058e2f14 --- /dev/null +++ b/nextcloud/root/etc/cont-init.d/51-elasticsearch @@ -0,0 +1,17 @@ +#!/usr/bin/with-contenv bashio + +# Install OCR if requested +if bashio::config.has_value 'test'; then + +#apt-get install openjdk-8-jre +apt install apt-transport-https +wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - +echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee -a /etc/apt/sources.list.d/elasticsearch.list +apt update +apt install elasticsearch +systemctl daemon-reload \ +&& systemctl enable elasticsearch\ +&& systemctl start elasticsearch +/usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment +systemctl restart elasticsearch +fi