From ed175facb1a18ee3ae48b2f15e2ab6670e1d62bb Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 10 Jun 2022 12:35:49 +0200 Subject: [PATCH] Update 99-run.sh --- seafile/rootfs/etc/cont-init.d/99-run.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/seafile/rootfs/etc/cont-init.d/99-run.sh b/seafile/rootfs/etc/cont-init.d/99-run.sh index d8945d480..c3b3a9628 100644 --- a/seafile/rootfs/etc/cont-init.d/99-run.sh +++ b/seafile/rootfs/etc/cont-init.d/99-run.sh @@ -6,18 +6,17 @@ ################# bashio::log.info "Setting data location" - DATA_LOCATION=$(bashio::config 'data_location') -echo "Setting permissions" + +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" -echo "Copying data" -cp -n /shared "$DATA_LOCATION" -rm -r /shared - echo "Creating symlink" +[ -d /shared ] && rm -r /shared ln -sf "$DATA_LOCATION" /shared #sed -i "s|/shared|$DATA_LOCATION|g" "/docker_entrypoint.sh"