From 8c999d29962665ac5e31953e784f4cec3694fddd Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 17 Dec 2022 01:39:18 +0100 Subject: [PATCH] Adapt location --- jellyfin/rootfs/etc/cont-init.d/00-data_location.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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"