Files
hassio-addons-old/kresus-mrraph/rootfs/etc/services.d/kresus/run
MrRaph_ 4e23d7dd7f 📦 chore(kresus): add Kresus addon files and configuration
 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
2024-03-06 11:27:44 +01:00

26 lines
1.1 KiB
Plaintext
Executable File

#!/usr/bin/with-contenv bashio
# ==============================================================================
# Init data directory
# ==============================================================================
if ! bashio::fs.directory_exists "${KRESUS_DIR}"; then
bashio::log.info "Create data directory \"${KRESUS_DIR}\""
mkdir "${KRESUS_DIR}"
chown "${KRESUS_USER}:${KRESUS_USER}" "${KRESUS_DIR}"
chmod 0700 "${KRESUS_DIR}"
fi
# ==============================================================================
# Generate Kresus salt once
# ==============================================================================
if ! bashio::fs.file_exists "/data/kresus_salt"; then
pwgen 32 1 > /data/kresus_salt
chown "${KRESUS_USER}:${KRESUS_USER}" /data/kresus_salt
chmod 400 /data/kresus_salt
fi
# ==============================================================================
# Start service as unprivileged user
# ==============================================================================
exec s6-setuidgid "${KRESUS_USER}" /usr/libexec/kresus/start.sh