From f2265865f960b0c7e01b1a219cb46c90f6ba2165 Mon Sep 17 00:00:00 2001 From: erxspin Date: Sat, 11 Mar 2017 05:06:43 +0600 Subject: [PATCH] Bug fix multiple records in db CentOS (#86) * added CentOS, Fedora, RHEL choices with minimal version check (recommited) * fixed small typos * added special option --use-php5-package * parse options and export new environment variable USE_PHP5_PACKAGE * added choice between php5* or php7.0* packages (recommited) * fixed php*-fpm service name and php.ini file path (recommited) * prepare socket name for nginx to work with php5-fpm or php7.0-fpm (recommited) * added ppa:ondrej/php5-compat repo * added dependency ppa:ondrej/php repo and package software-properties-common * drop and create again postgresql public schema with cascade option to prevent multiple domains creation in db --- centos/resources/postgres.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/centos/resources/postgres.sh b/centos/resources/postgres.sh index 9efe53a..eeaa7c5 100644 --- a/centos/resources/postgres.sh +++ b/centos/resources/postgres.sh @@ -31,6 +31,8 @@ systemctl restart postgresql-9.4 cwd=$(pwd) cd /tmp #add the databases, users and grant permissions to them +sudo -u postgres /usr/pgsql-9.4/bin/psql -d fusionpbx -c "DROP SCHEMA public cascade;"; +sudo -u postgres /usr/pgsql-9.4/bin/psql -d fusionpbx -c "CREATE SCHEMA public;"; sudo -u postgres /usr/pgsql-9.4/bin/psql -c "CREATE DATABASE fusionpbx"; sudo -u postgres /usr/pgsql-9.4/bin/psql -c "CREATE DATABASE freeswitch"; sudo -u postgres /usr/pgsql-9.4/bin/psql -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$password';"