From a7e33f2dd93cc198266924d61b7058fb4d668da7 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 29 Nov 2023 11:19:34 +0100 Subject: [PATCH] Update 02-init_steps.sh --- nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh b/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh index 92a898959..cce8213e6 100755 --- a/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh +++ b/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh @@ -163,11 +163,18 @@ if bashio::config.true "Enable_thumbnails"; then 12 => 'OC\Preview\AVI', )," > lines_to_add + lines_to_add="lines_to_add" + # Iterate through each line in the lines_to_add_file while IFS= read -r line; do + # Remove leading blanks + line="$(echo $line)" # Use sed to insert the line after the match "installed" in the config_file - sed -i "/installed/i\ \ ${line//[[:space:]]/}" config.php + sed -i "/installed/i\ \ $line" "$files" done < "$lines_to_add" + + # Clean temporary file + rm lines_to_add fi done fi