From beaecebd32a624de57fb20705e320db6ea8aa696 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 13 Sep 2022 16:53:49 +0200 Subject: [PATCH] Update 99-run.sh --- seafile/rootfs/etc/cont-init.d/99-run.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/seafile/rootfs/etc/cont-init.d/99-run.sh b/seafile/rootfs/etc/cont-init.d/99-run.sh index 1d512f54b..ac6536b5e 100644 --- a/seafile/rootfs/etc/cont-init.d/99-run.sh +++ b/seafile/rootfs/etc/cont-init.d/99-run.sh @@ -43,8 +43,11 @@ echo "Check $DATA_LOCATION folder exists" mkdir -p "$DATA_LOCATION" echo "Setting permissions" -chown -R "$(bashio::config 'PUID'):$(bashio::config 'PGID')" "$DATA_LOCATION" -chmod -R 755 "$DATA_LOCATION" +if bashio::config.has_value 'PUID'; then + chown -R "$(bashio::config 'PUID'):$(bashio::config 'PGID')" "$DATA_LOCATION" + chown -R "$(bashio::config 'PUID'):$(bashio::config 'PGID')" /shared + chmod -R 755 "$DATA_LOCATION" +fi echo "Creating symlink" ln -sf "$DATA_LOCATION" /shared