File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
root/etc/s6-overlay/s6-rc.d/init-bookstack-config Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ app_setup_block: |
113113
114114# changelog
115115changelogs :
116+ - { date: "31.10.23:", desc: "Further sanitize sed replace." }
116117 - { date: "07.06.23:", desc: "Add mariadb-client for bookstack-system-cli support." }
117118 - { date: "25.05.23:", desc: "Rebase to Alpine 3.18, deprecate armhf." }
118119 - { date: "13.04.23:", desc: "Move ssl.conf include to default.conf." }
Original file line number Diff line number Diff line change @@ -86,9 +86,12 @@ if [[ -n "${DB_HOST}" ]]; then
8686
8787 sed -i -E "s/^[#]?DB_HOST=.*/DB_HOST='${DB_HOST}'/g" /config/www/.env
8888 sed -i -E "s/^[#]?DB_PORT=.*/DB_PORT='${DB_PORT}'/g" /config/www/.env
89- sed -i -E "s/^[#]?DB_DATABASE=.*/DB_DATABASE='${DB_DATABASE}'/g" /config/www/.env
90- sed -i -E "s/^[#]?DB_USERNAME=.*/DB_USERNAME='${DB_USER}'/g" /config/www/.env
91- sed -i -E "s/^[#]?DB_PASSWORD=.*/DB_PASSWORD='${DB_PASS//&/\\&}'/g" /config/www/.env
89+ SED_DB_DATABASE=$(sed -e 's|[&\\/]|\\&|g; s|$|\\|; $s|\\$||' <<<"${DB_DATABASE}")
90+ sed -i -E "s/^[#]?DB_DATABASE=.*/DB_DATABASE='${SED_DB_DATABASE}'/g" /config/www/.env
91+ SED_DB_USER=$(sed -e 's|[&\\/]|\\&|g; s|$|\\|; $s|\\$||' <<<"${DB_USER}")
92+ sed -i -E "s/^[#]?DB_USERNAME=.*/DB_USERNAME='${SED_DB_USER}'/g" /config/www/.env
93+ SED_DB_PASS=$(sed -e 's|[&\\/]|\\&|g; s|$|\\|; $s|\\$||' <<<"${DB_PASS}")
94+ sed -i -E "s/^[#]?DB_PASSWORD=.*/DB_PASSWORD='${SED_DB_PASS}'/g" /config/www/.env
9295fi
9396
9497# set appurl
You can’t perform that action at this time.
0 commit comments