Update postgres.sh

This commit is contained in:
FusionPBX 2017-04-23 01:54:00 -06:00 committed by GitHub
parent ef6a0613bc
commit 2377fd8bc4
1 changed files with 1 additions and 0 deletions

View File

@ -68,6 +68,7 @@ sed -i "s/zzz/$password/g" /etc/cron.daily/fusionpbx-backup.sh
#move to /tmp to prevent a red herring error when running sudo with psql
cwd=$(pwd)
cd /tmp
#add the databases, users and grant permissions to them
sudo -u postgres psql -d fusionpbx -c "DROP SCHEMA public cascade;";
sudo -u postgres psql -d fusionpbx -c "CREATE SCHEMA public;";