From ed6cb2d8be1ecb79a573bccd927e2970b4fdee06 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 31 Aug 2021 15:11:12 +0200 Subject: [PATCH] Update 41-folders --- piwigo/rootfs/etc/cont-init.d/41-folders | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/piwigo/rootfs/etc/cont-init.d/41-folders b/piwigo/rootfs/etc/cont-init.d/41-folders index 279554ca0..c4c2a2e99 100644 --- a/piwigo/rootfs/etc/cont-init.d/41-folders +++ b/piwigo/rootfs/etc/cont-init.d/41-folders @@ -4,18 +4,26 @@ # SYMLINK CONFIG # ################## +if [ ! -d /share/piwigo ]; then + echo "Creating /share/piwigo" + mkdir -p /share/piwigo + chown -R abc:abc /share/piwigo +else + chown -R abc:abc /share/piwigo +fi + # If config doesn't exist, create it -if [ ! -d /data/config ]; then +if [ ! -d /share/piwigo/config ]; then echo "moving config folder" - mv /gallery/local/config /data - ln -s /data/config /gallery/local + mv /gallery/local/config /share/piwigo + ln -s /share/piwigo/config /gallery/local echo "links done" fi # If keys don't exist, create it -if [ ! -d /data/keys ]; then +if [ ! -d /share/piwigo/keys ]; then echo "moving keys folder" - mv /config/keys /data - ln -s /data/keys /config + mv /config/keys /share/piwigo + ln -s /share/piwigo/keys /config echo "links done" fi