From a74fcf0e03b9d01c142d26bb8db3737098e3c135 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 18 May 2022 13:56:58 +0200 Subject: [PATCH] Update 00-folders.sh --- resiliosync/rootfs/etc/cont-init.d/00-folders.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resiliosync/rootfs/etc/cont-init.d/00-folders.sh b/resiliosync/rootfs/etc/cont-init.d/00-folders.sh index c6ffef075..96dc29633 100644 --- a/resiliosync/rootfs/etc/cont-init.d/00-folders.sh +++ b/resiliosync/rootfs/etc/cont-init.d/00-folders.sh @@ -25,6 +25,11 @@ change_folders (change_fold) { # Modify files sed -i "s/$ORIGINALLOCATION/$CONFIGLOCATION|| true/g" /etc/cont-init.d/10-adduser || true + grep -rl "$ORIGINALLOCATION" /etc/cont-init.d | xargs sed -i "s|$ORIGINALLOCATION|$CONFIGLOCATION|g" + grep -rl "$ORIGINALLOCATION" /etc/services.d | xargs sed -i "s|$ORIGINALLOCATION|$CONFIGLOCATION|g" + sed -i "s=$ORIGINALLOCATION=$CONFIGLOCATION=g" /etc/cont-init.d/10-adduser + sed -i "s=$ORIGINALLOCATION=$CONFIGLOCATION=g" /defaults/* + # Create folders [ ! -d "$CONFIGLOCATION" ] && echo "Creating $CONFIGLOCATION" && mkdir -p "$CONFIGLOCATION"