Adapt sync.conf for new downloads folder

https://github.com/alexbelgium/hassio-addons/issues/466
This commit is contained in:
Alexandre
2022-09-21 09:15:48 +02:00
committed by GitHub
parent e451b64d5d
commit 145f2545e4

View File

@@ -34,7 +34,9 @@ change_folders () {
fi fi
if [ "$TYPE" = "data_location" ]; then if [ "$TYPE" = "data_location" ]; then
[ -f "$FILE" ] && jq --arg variable "$CONFIGLOCATION" '.directory_root = $variable' "$FILE" | sponge "$FILE" [ -f "$FILE" ] && jq --arg variable "$CONFIGLOCATION" '.directory_root = $variable' "$FILE" | sponge "$FILE"
[ -f "$FILE" ] && jq --arg variable "$CONFIGLOCATION/downloads" '.files_default_path = $variable' "$FILE" | sponge "$FILE" fi
if [ "$TYPE" = "downloads_location" ]; then
[ -f "$FILE" ] && jq --arg variable "$CONFIGLOCATION" '.files_default_path = $variable' "$FILE" | sponge "$FILE"
fi fi
done done