Przeglądaj źródła

Add UTF8 encoding and additional comments

FusionPBX 6 miesięcy temu
rodzic
commit
71db64e7e7
1 zmienionych plików z 9 dodań i 6 usunięć
  1. 9 6
      debian/resources/postgresql.sh

+ 9 - 6
debian/resources/postgresql.sh

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