Skip to content

Commit

Permalink
Fix content directory in configuration (Docker)
Browse files Browse the repository at this point in the history
- improve readability of regular expressions for `sed`
  • Loading branch information
mzuther authored and KarlStraussberger committed Feb 9, 2024
1 parent b7f5803 commit d1d3c97
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ if [ ! -f /var/run/gerbera/config.xml ]; then
gerbera --create-config --home /var/run/gerbera > /var/run/gerbera/config.xml

# Automatically scan /content with inotify (for a volume mount)
sed 's/<import hidden-files="no">/<import hidden-files="no">\n\
sed 's|<import hidden-files="no">|<import hidden-files="no">\n\
<autoscan use-inotify="yes">\n\
<directory location="\/content" mode="inotify" \
recursive="yes" hidden-files="no"\/>\n\
<\/autoscan>/' -i /var/run/gerbera/config.xml
<directory location="/mnt/content" mode="inotify" \
recursive="yes" hidden-files="no"/>\n\
</autoscan>|' -i /var/run/gerbera/config.xml

# Add directory for custom JavaScript scripts
sed 's/<\/common>/<\/common>\
<custom>\/mnt\/customization\/js<\/custom>/' -i /var/run/gerbera/config.xml
sed 's|</common>|</common>\
<custom>/mnt/customization/js</custom>|' -i /var/run/gerbera/config.xml

# Allow customization of Gerbera configuration file
if [ -x /mnt/customization/shell/gerbera_config.sh ]; then
Expand Down

0 comments on commit d1d3c97

Please sign in to comment.