diff --git a/jellyfin/rootfs/etc/cont-init.d/00-data_location.sh b/jellyfin/rootfs/etc/cont-init.d/00-data_location.sh index f7182894e..368c80ce9 100644 --- a/jellyfin/rootfs/etc/cont-init.d/00-data_location.sh +++ b/jellyfin/rootfs/etc/cont-init.d/00-data_location.sh @@ -11,10 +11,11 @@ if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then LOCATION=/config/addons_co # Set data location bashio::log.info "Setting data location to $LOCATION" -for file in $(grep -Esril "/config[ '\"/]|/config\$" /etc /defaults); do sed -Ei "s=(/config)+(/| |$|\"|\')=$LOCATION\2=g" $file; done +for file in $(grep -sril "/config" /etc /defaults); do sed -i "s=/config=$LOCATION=g" $file; done +for file in $(grep -sril "/usr/share/jellyfin/web" /etc /defaults); do sed -i "s=/usr/share/jellyfin/web=$LOCATION/web=g" $file; done echo "Creating $LOCATION" -mkdir -p "$LOCATION" +mkdir -p "$LOCATION" "$LOCATION"/data "$LOCATION"/cache "$LOCATION"/log "$LOCATION"/web bashio::log.info "Setting ownership to $PUID:$PGID" chown "$PUID":"$PGID" "$LOCATION"