From 1ab72cd29eb50019fd2b7ffe78ff79b607cab5e5 Mon Sep 17 00:00:00 2001 From: Jamil Bou Kheir Date: Fri, 9 Jul 2021 09:50:53 -0700 Subject: [PATCH] wrap password in quotes --- pkg/ubuntu-18.04_amd64/DEBIAN/postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ubuntu-18.04_amd64/DEBIAN/postinst b/pkg/ubuntu-18.04_amd64/DEBIAN/postinst index d10527bec..00dee0e7f 100755 --- a/pkg/ubuntu-18.04_amd64/DEBIAN/postinst +++ b/pkg/ubuntu-18.04_amd64/DEBIAN/postinst @@ -28,7 +28,7 @@ db_key="$(openssl rand -base64 32)" # Setup DB # XXX: Remove || true and detect actual failures -su postgres -c "psql -c 'CREATE ROLE ${db_user} WITH LOGIN PASSWORD ${db_password};' || true" +su postgres -c "psql -c 'CREATE ROLE ${db_user} WITH LOGIN PASSWORD \"${db_password}\";' || true" su postgres -c "psql -c 'CREATE DATABASE cloudfire;' || true" su postgres -c "psql -c 'GRANT ALL PRIVILEGES ON DATABASE cloudfire to ${db_user};' || true"