Skip to content

Commit 7e2f3fe

Browse files
authored
Merge pull request #123 from linuxserver/dbpass-sed
Improve sed and maintain consistency with other database password sed
2 parents 1365874 + 5a5da8d commit 7e2f3fe

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)