docspell/docker/joex-entrypoint.sh
Malte e9db579af6 added environment variable to set preferred OCRmyPDF version when using docker image
- e.g. `- OCRMYPDF_VERSION=v11.2.1`
 - default ist `latest`
2020-10-27 06:30:50 +01:00

18 lines
551 B
Bash
Executable File

#!/bin/sh
echo "Starting unoconv listener"
unoconv -l &
# replace own ocrmypdf with official dockerfile, i.e. newer version
if [ -S "/var/run/docker.sock" ]; then
echo "Found 'docker.sock': Installing Docker and redirecting 'ocrmypdf' command to official dockerfile by jbarlow83"
apk --no-cache add docker
docker pull -q jbarlow83/ocrmypdf:$OCRMYPDF_VERSION
function ocrmypdf () {
docker run jbarlow83/ocrmypdf:$OCRMYPDF_VERSION $@
}
echo "Using OCRmyPDF v$(ocrmypdf --version)" && echo
fi
/opt/docspell-joex/bin/docspell-joex "$@"