From faaa1451aa991354d76b77c2d5ed697081429473 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 28 Dec 2022 22:33:39 +0100 Subject: [PATCH] Adapt to lsio v3 https://github.com/alexbelgium/hassio-addons/issues/619 --- resiliosync/rootfs/etc/cont-init.d/00-folders.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resiliosync/rootfs/etc/cont-init.d/00-folders.sh b/resiliosync/rootfs/etc/cont-init.d/00-folders.sh index 5e97f5316..3a82fef03 100755 --- a/resiliosync/rootfs/etc/cont-init.d/00-folders.sh +++ b/resiliosync/rootfs/etc/cont-init.d/00-folders.sh @@ -24,10 +24,7 @@ change_folders () { # Modify files echo "Adapting files" - grep -rl "$ORIGINALLOCATION" /etc/cont-init.d | xargs sed -i "s|$ORIGINALLOCATION|$CONFIGLOCATION|g" || true - grep -rl "$ORIGINALLOCATION" /etc/services.d | xargs sed -i "s|$ORIGINALLOCATION|$CONFIGLOCATION|g" || true - sed -i "s=$ORIGINALLOCATION=$CONFIGLOCATION=g" /etc/cont-init.d/10-adduser || true - sed -i "s=$ORIGINALLOCATION=$CONFIGLOCATION=g" /defaults/* || true + for file in $(grep -sril "$ORIGINALLOCATION" /etc /defaults); do sed -i "s=$ORIGINALLOCATION=$CONFIGLOCATION=g" $file; done # Adapt sync.conf for FILE in "$ORIGINALLOCATION/sync.conf" "$CONFIGLOCATION/sync.conf" "/defaults/sync.conf"; do @@ -71,3 +68,5 @@ change_folders () { change_folders "$(bashio::config 'config_location')" "/share/resiliosync_config" "config_location" change_folders "$(bashio::config 'data_location')" "/share/resiliosync" "data_location" change_folders "$(bashio::config 'downloads_location')" "/share/resiliosync_downloads" "downloads_location" + +mkdir -p /share/resiliosync