mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-17 06:11:49 +02:00
Rename 51-OCR_script to 51-ocr
This commit is contained in:
27
nextcloud/root/etc/cont-init.d/51-ocr
Normal file
27
nextcloud/root/etc/cont-init.d/51-ocr
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/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
|
||||
# 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
|
||||
elif $(bashio::config 'OCR') = false; then
|
||||
bashio::log.info 'Removing OCR' && \
|
||||
apk del tesseract-ocr.*
|
||||
fi
|
||||
fi
|
||||
|
||||
# Add additional trusted domains
|
||||
|
||||
# if bashio::config.has_value 'Trusted_Domains'; then
|
||||
# TRUSTEDDOMAINS=$(bashio::config 'Trusted_Domains')
|
||||
# for domains in $TRUSTEDDOMAINS
|
||||
# do
|
||||
# ./occ config:system:set trusted_domains 2 --value=$domains
|
||||
# done || \
|
||||
# fi
|
||||
Reference in New Issue
Block a user