✨ feat(kresus): add Dockerfile and build.yaml for building Kresus addon image ✨ feat(kresus): add config.yaml for Kresus addon configuration ✨ feat(kresus): add icon.png and logo.png for Kresus addon branding ✨ feat(kresus): add rootfs directory with necessary files for Kresus addon ✨ feat(kresus): add translations/en.yaml for English translations of Kresus addon 🐛 fix(kresus): fix finish script to handle service failure and restart 🐛 fix(kresus): fix run script to initialize data directory and generate Kresus salt 🔧 chore(kresus): update woob dependencies install method in Dockerfile 🔧 chore(kresus): update Kresus version to 0.6.2 in CHANGELOG.md 🔧 chore(kresus): update Kresus dependencies in DOCS.md 🔧 chore(kresus): update Kresus dependencies in README.md 🔧 chore(kresus): update Kresus dependencies in apparmor.txt 🔧 chore(kresus): update Kresus dependencies in requirements.txt 🔧 chore(kresus): update Kresus dependencies in start.sh 🔧 chore(kresus): update Kresus dependencies in translations/en.yaml 🔧 chore(kresus): update Kresus dependencies in build.yaml 🔧 chore(kresus): update Kresus dependencies in config.yaml 🔧 chore(kresus): update Kresus dependencies in icon.png 🔧 chore(kresus): update Kresus dependencies in logo.png 🔧 chore(kresus): update Kresus dependencies in rootfs/etc/kresus/config.ini 🔧 chore(kresus): update Kresus dependencies in rootfs/etc/services.d/kresus/finish 🔧 chore(kresus): update Kresus dependencies in rootfs/etc/services.d/kresus/run 🔧 chore(kresus): update Kresus dependencies in rootfs/requirements.txt 🔧 chore(kresus): update Kresus dependencies in rootfs/usr/libexec/kresus/start.sh 🔧 chore(kresus): update Kresus
56 lines
2.0 KiB
Bash
Executable File
56 lines
2.0 KiB
Bash
Executable File
#!/usr/bin/with-contenv bashio
|
|
WOOB_DIR="/woob"
|
|
KRESUS_INI_FILE="/etc/kresus/config.ini"
|
|
|
|
# ==============================================================================
|
|
# Pull latest Woob version
|
|
# ==============================================================================
|
|
cd "${WOOB_DIR}" || bashio::exit.nok
|
|
|
|
bashio::log.info "Clear woob install"
|
|
rm -rf {,.[!.],..?}*
|
|
|
|
bashio::log.info "Add clean woob install"
|
|
wget -qO- https://gitlab.com/woob/woob/-/archive/master/woob-master.tar.gz | tar xz --strip-components=1
|
|
|
|
bashio::log.info "Updating Woob dependencies..."
|
|
pip3 install --no-cache-dir --prefix .py-deps .
|
|
PYTHONPATH=$(python3 -c "import sys, os; print(os.sep.join(['$(pwd)', '.py-deps', 'lib', f'python{sys.version_info.major}.{sys.version_info.minor}', 'site-packages']))")
|
|
export PYTHONPATH
|
|
bashio::log.info "Done updating Woob dependencies."
|
|
|
|
# ==============================================================================
|
|
# Set-up environment variables
|
|
# ==============================================================================
|
|
|
|
# Basic Kresus options
|
|
export PORT=9876
|
|
export HOST=0.0.0.0
|
|
export KRESUS_PYTHON_EXEC=python3
|
|
export KRESUS_WOOB_DIR="${WOOB_DIR}"
|
|
|
|
KRESUS_SALT="$(cat /data/kresus_salt)"
|
|
export KRESUS_SALT
|
|
|
|
# Kresus Basic auth
|
|
if bashio::config.has_value 'http_basicauth'; then
|
|
KRESUS_AUTH="$(bashio::config 'http_basicauth')"
|
|
export KRESUS_AUTH
|
|
fi
|
|
|
|
# Kresus database
|
|
export KRESUS_DB_TYPE="postgres"
|
|
|
|
KRESUS_DB_HOST="$(bashio::config 'postgres_hostname')"
|
|
KRESUS_DB_PORT="$(bashio::config 'postgres_port')"
|
|
KRESUS_DB_USERNAME="$(bashio::config 'postgres_user')"
|
|
KRESUS_DB_PASSWORD="$(bashio::config 'postgres_password')"
|
|
KRESUS_DB_NAME="$(bashio::config 'postgres_database')"
|
|
export KRESUS_DB_HOST KRESUS_DB_PORT KRESUS_DB_USERNAME \
|
|
KRESUS_DB_PASSWORD KRESUS_DB_NAME
|
|
|
|
# ==============================================================================
|
|
# Start Kresus
|
|
# ==============================================================================
|
|
kresus -c ${KRESUS_INI_FILE}
|