Update create.sh

This commit is contained in:
FusionPBX 2018-10-25 10:47:59 -06:00 committed by GitHub
parent ea04d00a4b
commit 9e52fb86c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -11,18 +11,18 @@ cwd=$(pwd)
cd /tmp cd /tmp
#set client encoding #set client encoding
sudo -u postgres psql -c "SET client_encoding = 'UTF8';"; sudo -u postgres psql -p $database_port -c "SET client_encoding = 'UTF8';";
#add the database users and databases #add the database users and databases
sudo -u postgres psql -c "CREATE DATABASE fusionpbx;"; sudo -u postgres psql -p $database_port -c "CREATE DATABASE fusionpbx;";
sudo -u postgres psql -c "CREATE DATABASE freeswitch;"; sudo -u postgres psql -p $database_port -c "CREATE DATABASE freeswitch;";
#add the users and grant permissions #add the users and grant permissions
sudo -u postgres psql -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$database_password';" sudo -u postgres psql -p $database_port -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$database_password';"
sudo -u postgres psql -c "CREATE ROLE freeswitch WITH SUPERUSER LOGIN PASSWORD '$database_password';" sudo -u postgres psql -p $database_port -c "CREATE ROLE freeswitch WITH SUPERUSER LOGIN PASSWORD '$database_password';"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;" sudo -u postgres psql -p $database_port -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 -p $database_port -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to fusionpbx;"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to freeswitch;" sudo -u postgres psql -p $database_port -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to freeswitch;"
#restart postgres #restart postgres
service postgresql restart service postgresql restart