From f4b4f0994326194247c8652d35990e6ba6114206 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 6 Oct 2021 17:59:39 -0600 Subject: [PATCH] Update the path to psql. --- centos/resources/postgresql.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/centos/resources/postgresql.sh b/centos/resources/postgresql.sh index a0da89a..2e473d3 100755 --- a/centos/resources/postgresql.sh +++ b/centos/resources/postgresql.sh @@ -40,15 +40,15 @@ cwd=$(pwd) cd /tmp #add the databases, users and grant permissions to them -sudo -u postgres /usr/pgsql-9.6/bin/psql -d fusionpbx -c "DROP SCHEMA public cascade;"; -sudo -u postgres /usr/pgsql-9.6/bin/psql -d fusionpbx -c "CREATE SCHEMA public;"; -sudo -u postgres /usr/pgsql-9.6/bin/psql -c "CREATE DATABASE fusionpbx"; -sudo -u postgres /usr/pgsql-9.6/bin/psql -c "CREATE DATABASE freeswitch"; -sudo -u postgres /usr/pgsql-9.6/bin/psql -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$password';" -sudo -u postgres /usr/pgsql-9.6/bin/psql -c "CREATE ROLE freeswitch WITH SUPERUSER LOGIN PASSWORD '$password';" -sudo -u postgres /usr/pgsql-9.6/bin/psql -c "GRANT ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;" -sudo -u postgres /usr/pgsql-9.6/bin/psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to fusionpbx;" -sudo -u postgres /usr/pgsql-9.6/bin/psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to freeswitch;" +sudo -u postgres /usr/bin/psql -d fusionpbx -c "DROP SCHEMA public cascade;"; +sudo -u postgres /usr/bin/psql -d fusionpbx -c "CREATE SCHEMA public;"; +sudo -u postgres /usr/bin/psql -c "CREATE DATABASE fusionpbx"; +sudo -u postgres /usr/bin/psql -c "CREATE DATABASE freeswitch"; +sudo -u postgres /usr/bin/psql -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$password';" +sudo -u postgres /usr/bin/psql -c "CREATE ROLE freeswitch WITH SUPERUSER LOGIN PASSWORD '$password';" +sudo -u postgres /usr/bin/psql -c "GRANT ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;" +sudo -u postgres /usr/bin/psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to fusionpbx;" +sudo -u postgres /usr/bin/psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to freeswitch;" #ALTER USER fusionpbx WITH PASSWORD 'newpassword'; cd $cwd