Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

docker-entrypoint.sh: fix shellcheck issues

Sven Fischer4460fb7004dc
diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh
index 09c4168f8..60b369cae 100644
--- a/scripts/docker-entrypoint.sh
+++ b/scripts/docker-entrypoint.sh
@@ -7,9 +7,9 @@ map_uidgid() {
USERMAP_ORIG_UID=$(id -g paperless)
USERMAP_GID=${USERMAP_GID:-${USERMAP_UID:-$USERMAP_ORIG_GID}}
USERMAP_UID=${USERMAP_UID:-$USERMAP_ORIG_UID}
- if [[ ${USERMAP_UID} != ${USERMAP_ORIG_UID} || ${USERMAP_GID} != ${USERMAP_ORIG_GID} ]]; then
+ if [[ ${USERMAP_UID} != "${USERMAP_ORIG_UID}" || ${USERMAP_GID} != "${USERMAP_ORIG_GID}" ]]; then
echo "Mapping UID and GID for paperless:paperless to $USERMAP_UID:$USERMAP_GID"
- groupmod -g ${USERMAP_GID} paperless
+ groupmod -g "${USERMAP_GID}" paperless
sed -i -e "s|:${USERMAP_ORIG_UID}:${USERMAP_GID}:|:${USERMAP_UID}:${USERMAP_GID}:|" /etc/passwd
fi
}
@@ -62,11 +62,11 @@ install_languages() {
# Loop over languages to be installed
for lang in "${langs[@]}"; do
pkg="tesseract-ocr-$lang"
- if dpkg -s "$pkg" 2>&1 > /dev/null; then
+ if dpkg -s "$pkg" > /dev/null 2>&1; then
continue
fi
- if ! apt-cache show "$pkg" 2>&1 > /dev/null; then
+ if ! apt-cache show "$pkg" > /dev/null 2>&1; then
continue
fi