From 71db64e7e73668e6e89b1f50d30914ffc2ce2e01 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 30 Dec 2024 09:05:38 -0700 Subject: [PATCH] Add UTF8 encoding and additional comments --- debian/resources/postgresql.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/debian/resources/postgresql.sh b/debian/resources/postgresql.sh index 26cb852..455e7f9 100755 --- a/debian/resources/postgresql.sh +++ b/debian/resources/postgresql.sh @@ -94,15 +94,18 @@ if [ ."$database_host" = ."127.0.0.1" ] || [ ."$database_host" = ."::1" ] ; then #reload the config sudo -u postgres psql -c "SELECT pg_reload_conf();" - # add the databases, users and grant permissions to them + #set client encoding + sudo -u postgres psql -c "SET client_encoding = 'UTF8';"; + + #add the database users and databases sudo -u postgres psql -c "CREATE DATABASE fusionpbx;"; - sudo -u postgres psql -c "CREATE DATABASE freeswitch;"; + + #add the users and grant permissions sudo -u postgres psql -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$password';" - sudo -u postgres psql -c "CREATE ROLE freeswitch WITH SUPERUSER LOGIN PASSWORD '$password';" sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;" - sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to fusionpbx;" - sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to freeswitch;" - # ALTER USER fusionpbx WITH PASSWORD 'newpassword'; + + #update the fusionpbx user password + #ALTER USER fusionpbx WITH PASSWORD 'newpassword'; fi cd $cwd