From a3caa66a87bcc821dc154287cd0e493002f9ef11 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 25 Jun 2025 09:20:38 +0200 Subject: [PATCH] Move config to /config --- resiliosync/rootfs/etc/cont-init.d/00-folders.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resiliosync/rootfs/etc/cont-init.d/00-folders.sh b/resiliosync/rootfs/etc/cont-init.d/00-folders.sh index dac26300a..5cf8d8d84 100755 --- a/resiliosync/rootfs/etc/cont-init.d/00-folders.sh +++ b/resiliosync/rootfs/etc/cont-init.d/00-folders.sh @@ -30,9 +30,6 @@ change_folders() { # Adapt sync.conf for FILE in "$ORIGINALLOCATION/sync.conf" "$CONFIGLOCATION/sync.conf" "/defaults/sync.conf"; do - if [ "$TYPE" = "config_location" ]; then - [ -f "$FILE" ] && jq --arg variable "$CONFIGLOCATION" '.storage_path = $variable' "$FILE" | sponge "$FILE" - fi if [ "$TYPE" = "data_location" ]; then [ -f "$FILE" ] && jq --arg variable "$CONFIGLOCATION" '.directory_root = $variable' "$FILE" | sponge "$FILE" fi @@ -67,13 +64,16 @@ change_folders() { ######################## # Adapt files -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" -if [[ ! -e "$(bashio::config 'config_location')"/sync.conf ]]; then - cp /defaults/sync.conf "$(bashio::config 'config_location')"/sync.conf +# Ensure configuration is in /config +if [[ ! -e /config/sync.conf ]]; then + cp /defaults/sync.conf /config/sync.conf fi +jq '.storage_path = "/config"' /config/sync.conf | sponge /config/sync.conf +chown -R "$PUID":"$PGID" /config +chmod -R 777 /config # Add directories to dir_whitelist if missing DIRS_TO_ADD=("/backup" "/media" "/share" "/addons")