From fd8d04016552f7d3be0cc43222181577957b24fa Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 11 Jan 2026 09:45:12 +0100 Subject: [PATCH] Update 00-folders.sh --- organizr/rootfs/etc/cont-init.d/00-folders.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/organizr/rootfs/etc/cont-init.d/00-folders.sh b/organizr/rootfs/etc/cont-init.d/00-folders.sh index 03e3696ae..4316277b9 100755 --- a/organizr/rootfs/etc/cont-init.d/00-folders.sh +++ b/organizr/rootfs/etc/cont-init.d/00-folders.sh @@ -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