From d9f322394f519d93e082eb0c5a9de80db11066ca Mon Sep 17 00:00:00 2001 From: Jamil Bou Kheir Date: Fri, 9 Jul 2021 09:56:34 -0700 Subject: [PATCH] Fix postinst quotes --- pkg/ubuntu-18.04_amd64/DEBIAN/postinst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/ubuntu-18.04_amd64/DEBIAN/postinst b/pkg/ubuntu-18.04_amd64/DEBIAN/postinst index 7e0f17dd3..17cb8b10a 100755 --- a/pkg/ubuntu-18.04_amd64/DEBIAN/postinst +++ b/pkg/ubuntu-18.04_amd64/DEBIAN/postinst @@ -28,9 +28,9 @@ 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 DATABASE cloudfire;' || true" -su postgres -c "psql -c 'GRANT ALL PRIVILEGES ON DATABASE cloudfire to ${db_user};' || 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" # Write CloudFire SSL files mkdir -p /opt/cloudfire/ssl