From 6e37c1814fc067127ebbee9bc3a8300af786fc18 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 15 Jun 2017 10:30:13 -0700 Subject: [PATCH] Create dsn.sh --- debian/resources/postgresql/dsn.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/resources/postgresql/dsn.sh b/debian/resources/postgresql/dsn.sh index 158dda2..7835c1d 100755 --- a/debian/resources/postgresql/dsn.sh +++ b/debian/resources/postgresql/dsn.sh @@ -30,6 +30,7 @@ fi #load the schema if [ .$load_schema = ."y" ]; then + sudo -u postgres psql -d freeswitch -c "create extension pgcrypto;"; sudo -u postgres psql -d freeswitch -f /var/www/fusionpbx/resources/install/sql/switch.sql -L /tmp/schema.log; fi @@ -46,6 +47,12 @@ sudo -u postgres psql -d fusionpbx -c "insert into v_vars (var_uuid, var_name, v sudo -u postgres psql -d fusionpbx -c "insert into v_vars (var_uuid, var_name, var_value, var_cat, var_enabled, var_order, var_description, var_hostname) values ('0170e737-b453-40ea-99f2-f1375474e5ce', 'dsn', 'pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=fusionpbx password=$database_password options=', 'DSN', 'true', '0', null, null);"; sudo -u postgres psql -d fusionpbx -c "insert into v_vars (var_uuid, var_name, var_value, var_cat, var_enabled, var_order, var_description, var_hostname) values ('32e3e364-a8ef-4fe0-9d02-c652d5122bbf', 'dsn_callcenter', 'sqlite:///usr/local/freeswitch/db/call_center.db', 'DSN', 'false', '0', null, null);"; +#add the +echo '' > /etc/freeswitch/vars.xml +echo '' > /etc/freeswitch/vars.xml +echo '' > /etc/freeswitch/vars.xml +echo '' > /etc/freeswitch/vars.xml + #remove the sqlite database files rm /var/lib/freeswitch/db/core.db rm /var/lib/freeswitch/db/fifo.db