diff --git a/papermerge/rootfs/etc/cont-init.d/00-folders.sh b/papermerge/rootfs/etc/cont-init.d/00-folders.sh index 80a70c962..bf2ad7c17 100644 --- a/papermerge/rootfs/etc/cont-init.d/00-folders.sh +++ b/papermerge/rootfs/etc/cont-init.d/00-folders.sh @@ -1,15 +1,14 @@ #!/usr/bin/with-contenv bashio # shellcheck shell=bash -CONFIGLOCATION=$(bashio::config "CONFIG_LOCATION") +# Config location +CONFIGLOCATION="$(bashio::config 'CONFIG_LOCATION')" +# Text +bashio::log.info "Setting config location to $CONFIGLOCATION" -if [ ! -d "$CONFIGLOCATION" ]; then - CONFIGLOCATION="$(dirname "$CONFIGLOCATION")" -fi - +# Adapt files sed -i "s|/data/config|$CONFIGLOCATION|g" /etc/cont-init.d/* -sed -i "s|/data/config|$CONFIGLOCATION|g" /defaults/* # Create directory mkdir -p "$CONFIGLOCATION"/config