Add UTF8 encoding and additional comments

This commit is contained in:
FusionPBX 2024-12-30 09:05:38 -07:00 committed by GitHub
parent 327d6d136c
commit 71db64e7e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 6 deletions

View File

@ -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