Files
hassio-addons/nextcloud/root/etc/cont-init.d/51-install_options
2021-01-18 15:55:54 +01:00

18 lines
603 B
Plaintext

#!/usr/bin/with-contenv bashio
# Install OCR if requested
if bashio::config.has_value 'OCR'; then
if $(bashio::config 'OCR') = true; then
bashio::log.info 'Installing OCR' && \
apk add --no-cache tesseract-ocr \
elif $(bashio::config 'OCR') = false; then
bashio::log.info 'Removing OCR' && \
apk del tesseract-ocr.*
fi
# Install additional language if requested
if bashio::config.has_value 'OCRLANG'; then
bashio::log.info 'Installing OCR language' && \
apk add --no-cache tesseract-ocr-data-$(bashio::config 'OCRLANG')
fi
fi