Switch to 1.8.2

This commit is contained in:
Alexandre
2022-11-01 18:58:37 +01:00
parent e2c322ec71
commit c6f80bdd16
10 changed files with 99 additions and 73 deletions

View File

@@ -0,0 +1,27 @@
#!/bin/bash
echo "Starting..."
############################
# Backup Dockerfile Script #
############################
if [ -f /etc/cont-init.d/00-aaa_dockerfile_backup.sh ]; then
chown "$(id -u)":"$(id -g)" /etc/cont-init.d/00-aaa_dockerfile_backup.sh
chmod +x /etc/cont-init.d/00-aaa_dockerfile_backup.sh
/./etc/cont-init.d/00-aaa_dockerfile_backup.sh
rm /etc/cont-init.d/00-aaa_dockerfile_backup.sh
fi
####################
# Starting scripts #
####################
for SCRIPTS in /etc/cont-init.d/*; do
[ -e "$SCRIPTS" ] || continue
echo "$SCRIPTS: executing"
chown "$(id -u)":"$(id -g)" "$SCRIPTS"
chmod a+x "$SCRIPTS"
# Change shebang if no s6 supervision
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"
/."$SCRIPTS" || echo "$SCRIPTS: exiting $?"
done

View File

@@ -4,16 +4,8 @@
slug=paperless_ng
if [ ! -d /config/addons_config/$slug ]; then
if [ -d /config/$slug ]; then
echo "Moving to new location /config/addons_config/$slug"
mkdir -p /config/addons_config/$slug
chmod 777 /config/addons_config/$slug
mv /config/$slug/* /config/addons_config/$slug/
rm -r /config/$slug
fi
echo "Creating /config/addons_config/$slug"
mkdir -p /config/addons_config/$slug
chmod 777 /config/addons_config/$slug
fi
chmod 777 /config/addons_config/$slug

View File

@@ -1,14 +0,0 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
echo "Installing pikepdf..."
(
export DEBIAN_FRONTEND="noninteractive"
export TERM="xterm-256color"
apt-get update
apt-get install -yq libxml2-dev libxslt-dev python-dev
apt-get install -yq libjpeg-dev zlib1g-dev
apt-get install -yq python3-dev build-essential
pip install pikepdf --force-reinstall
) >/dev/null
echo "... success!"

View File

@@ -1,16 +0,0 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
OCRLANG=$(bashio::config 'OCRLANG')
if [ -n "$OCRLANG" ]; then
apt-get update &>/dev/null
echo "OCRLANG variable is set, processing the language packages"
for i in ${OCRLANG//,/ }; do
if apt-cache show tesseract-ocr-"${i}" >/dev/null 2>&1; then
apt-get install -yq tesseract-ocr-"${i}"
bashio::log.info "OCR Language installed : $i" || bashio::log.fatal "Couldn't install OCR lang $i. Please check its format is conform"
else
echo "package tesseract-ocr-${i} not found in the repository, skipping"
fi
done
fi

View File

@@ -1,4 +1,11 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# Staring redis
exec redis-server & bashio::log.info "Starting redis"
# Avoid overcommit memory
bashio::log.info "Avoid overcommit memory"
sysctl vm.overcommit_memory=1
bashio::log.info "Initial username and password are admin. Please change in the administration panel of the webUI after login."