Skip to content

Commit 5a5da8d

Browse files
authored
Update 50-config
improve sed for password
1 parent 1365874 commit 5a5da8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

root/etc/cont-init.d/50-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fi
6262
if [ "${DB_USER}" ];
6363
then
6464
echo "Running config - db_user set"
65-
ESCAPED_PASSWORD=$(sed -e 's/[$\/&]/\\&/g' <<< $DB_PASS)
65+
ESCAPED_PASSWORD=$(sed -E 's/('\'')/\\\1/g' <<< $DB_PASS)
6666
sed -i "s/DB_HOST=localhost/DB_HOST=${DB_HOST}/g" /config/www/.env
6767
sed -i "s/DB_DATABASE=database_database/DB_DATABASE=${DB_DATABASE}/g" /config/www/.env
6868
sed -i "s/DB_USERNAME=database_username/DB_USERNAME=${DB_USER}/g" /config/www/.env

0 commit comments

Comments
 (0)