mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-30 20:34:04 +02:00
Update 02-init_steps.sh
This commit is contained in:
@@ -163,11 +163,18 @@ if bashio::config.true "Enable_thumbnails"; then
|
|||||||
12 => 'OC\Preview\AVI',
|
12 => 'OC\Preview\AVI',
|
||||||
)," > lines_to_add
|
)," > lines_to_add
|
||||||
|
|
||||||
|
lines_to_add="lines_to_add"
|
||||||
|
|
||||||
# Iterate through each line in the lines_to_add_file
|
# Iterate through each line in the lines_to_add_file
|
||||||
while IFS= read -r line; do
|
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
|
# 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"
|
done < "$lines_to_add"
|
||||||
|
|
||||||
|
# Clean temporary file
|
||||||
|
rm lines_to_add
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user