Update 00-folders.sh

This commit is contained in:
Alexandre
2026-01-11 09:45:12 +01:00
committed by GitHub
parent 59ca5254c2
commit fd8d040165

View File

@@ -2,9 +2,22 @@
# shellcheck shell=bash
set -e
PUID="$(bashio::config 'PUID')"
PGID="$(bashio::config 'PGID')"
PUID="$(bashio::config 'PUID' || echo 1000)"
PGID="$(bashio::config 'PGID' || echo 1000)"
echo "Creating /data/organizr"
mkdir -p /data/organizr
chown -R "$PUID:$PGID" /data
chown "$PUID:$PGID" /data/organizr
# Only act if the symlink target does not exist
if [[ ! -f /data/organizr/www/organizr/api/data/organizr/default.php ]]; then
echo "Fix issues in upstream"
mkdir -p /data/organizr/www/organizr/api/data/organizr
if [[ -f /data/organizr/www/organizr/api/config/default.php ]]; then
ln -sf /data/organizr/www/organizr/api/config/default.php /data/organizr/www/organizr/api/data/organizr/default.php
else
echo "WARNING: /data/organizr/www/organizr/api/config/default.php does not exist, cannot create symlink"
fi
chown -R "$PUID:$PGID" /data/organizr
fi