From fda4764a023e6732ac3209e20e113662799f6966 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 21 Aug 2024 16:16:38 +0200 Subject: [PATCH] Correct Variable expansion --- jellyseerr/rootfs/etc/cont-init.d/90-run.sh | 24 ++++++++++----------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/jellyseerr/rootfs/etc/cont-init.d/90-run.sh b/jellyseerr/rootfs/etc/cont-init.d/90-run.sh index 6a83e29eb..32226d726 100755 --- a/jellyseerr/rootfs/etc/cont-init.d/90-run.sh +++ b/jellyseerr/rootfs/etc/cont-init.d/90-run.sh @@ -13,19 +13,17 @@ ln -s "$CONFIG_LOCATION" /app/config chmod -R 755 "$CONFIG_LOCATION" #Move files that may be in misspelled directory -if [ -d "$OLD_CONFIG_LOCATION" ]; - then - #Directory Exists - if [ -z "$( ls -A '$OLD_CONFIG_LOCATION' )" ]; - then - #Empty - rmdir "$OLD_CONFIG_LOCATION" - else - #Not Empty - bashio::log.info "Moving old configuration settings from $OLD_CONFIG_LOCATION to $CONFIG_LOCATION" - cp -rnT "$OLD_CONFIG_LOCATION" "$CONFIG_LOCATION"/ - rm -r "$OLD_CONFIG_LOCATION" - fi +if [ -d "$OLD_CONFIG_LOCATION" ]; then + # Directory Exists + if [ -z "$(ls -A "$OLD_CONFIG_LOCATION")" ]; then + # Empty + rmdir "$OLD_CONFIG_LOCATION" + else + # Not Empty + bashio::log.info "Moving old configuration settings from $OLD_CONFIG_LOCATION to $CONFIG_LOCATION" + cp -rnT "$OLD_CONFIG_LOCATION" "$CONFIG_LOCATION/" + rm -r "$OLD_CONFIG_LOCATION" + fi fi # Create files