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: |
113
113
114
114
# changelog
115
115
changelogs :
116
+ - { date: "31.10.23:", desc: "Further sanitize sed replace." }
116
117
- { date: "07.06.23:", desc: "Add mariadb-client for bookstack-system-cli support." }
117
118
- { date: "25.05.23:", desc: "Rebase to Alpine 3.18, deprecate armhf." }
118
119
- { 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
86
86
87
87
sed -i -E "s/^[#]?DB_HOST=.*/DB_HOST='${DB_HOST}'/g" /config/www/.env
88
88
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
92
95
fi
93
96
94
97
# set appurl
You can’t perform that action at this time.
0 commit comments