浏览代码

make database host dynamic. (#334)

Co-authored-by: Gill Abada <[email protected]>
Gill Abada 5 年之前
父节点
当前提交
278e65c2e1

+ 1 - 0
centos/resources/finish.sh

@@ -26,6 +26,7 @@ sudo -u postgres /usr/pgsql-9.4/bin/psql -c "ALTER USER freeswitch WITH PASSWORD
 mkdir -p /etc/fusionpbx
 chown -R freeswitch:daemon /etc/fusionpbx
 cp fusionpbx/config.php /etc/fusionpbx
+sed -i /etc/fusionpbx/config.php -e s:"{database_host}:$database_host:"
 sed -i /etc/fusionpbx/config.php -e s:'{database_username}:fusionpbx:'
 sed -i /etc/fusionpbx/config.php -e s:"{database_password}:$database_password:"
 

+ 1 - 1
centos/resources/fusionpbx/config.php

@@ -32,7 +32,7 @@
 	//$db_path = '/var/www/fusionpbx/secure'; //the path is determined by a php variable
 
 //pgsql: database connection information
-	$db_host = 'localhost'; //set the host only if the database is not local
+	$db_host = '{database_host}';
 	$db_port = '5432';
 	$db_name = 'fusionpbx';
 	$db_username = '{database_username}';

+ 1 - 0
debian/resources/finish.sh

@@ -34,6 +34,7 @@ sed -i "s/zzz/$database_password/g" /etc/cron.daily/fusionpbx-maintenance
 mkdir -p /etc/fusionpbx
 chown -R www-data:www-data /etc/fusionpbx
 cp fusionpbx/config.php /etc/fusionpbx
+sed -i /etc/fusionpbx/config.php -e s:"{database_host}:$database_host:"
 sed -i /etc/fusionpbx/config.php -e s:'{database_username}:fusionpbx:'
 sed -i /etc/fusionpbx/config.php -e s:"{database_password}:$database_password:"
 

+ 1 - 1
debian/resources/fusionpbx/config.php

@@ -32,7 +32,7 @@
 	//$db_path = '/var/www/fusionpbx/secure'; //the path is determined by a php variable
 
 //pgsql: database connection information
-	$db_host = 'localhost'; //set the host only if the database is not local
+	$db_host = '{database_host}';
 	$db_port = '5432';
 	$db_name = 'fusionpbx';
 	$db_username = '{database_username}';

+ 1 - 0
devuan/resources/finish.sh

@@ -69,6 +69,7 @@ cd $cwd
 mkdir -p /etc/fusionpbx
 chown -R www-data:www-data /etc/fusionpbx
 cp fusionpbx/config.php /etc/fusionpbx
+sed -i /etc/fusionpbx/config.php -e s:"{database_host}:$database_host:"
 sed -i /etc/fusionpbx/config.php -e s:'{database_username}:fusionpbx:'
 sed -i /etc/fusionpbx/config.php -e s:"{database_password}:$database_password:"
 

+ 1 - 1
devuan/resources/fusionpbx/config.php

@@ -32,7 +32,7 @@
 	//$db_path = '/var/www/fusionpbx/secure'; //the path is determined by a php variable
 
 //pgsql: database connection information
-	$db_host = 'localhost'; //set the host only if the database is not local
+	$db_host = '{database_host}';
 	$db_port = '5432';
 	$db_name = 'fusionpbx';
 	$db_username = '{database_username}';

+ 1 - 0
freebsd/resources/finish.sh

@@ -32,6 +32,7 @@ if [ .$nginx_enabled = .'true' ]; then
 	mkdir -p /etc/fusionpbx
 	chown -R www:www /etc/fusionpbx
 	cp fusionpbx/config.php /etc/fusionpbx
+	sed -i' ' -e s:"{database_host}:$database_host:" /etc/fusionpbx/config.php
 	sed -i' ' -e s:'{database_username}:fusionpbx:' /etc/fusionpbx/config.php
 	sed -i' ' -e s:"{database_password}:$database_password:" /etc/fusionpbx/config.php
 

+ 1 - 1
freebsd/resources/fusionpbx/config.php

@@ -32,7 +32,7 @@
 	//$db_path = '/var/www/fusionpbx/secure'; //the path is determined by a php variable
 
 //pgsql: database connection information
-	$db_host = 'localhost'; //set the host only if the database is not local
+	$db_host = '{database_host}';
 	$db_port = '5432';
 	$db_name = 'fusionpbx';
 	$db_username = '{database_username}';

+ 1 - 0
ubuntu/resources/finish.sh

@@ -34,6 +34,7 @@ sed -i "s/zzz/$database_password/g" /etc/cron.daily/fusionpbx-maintenance
 mkdir -p /etc/fusionpbx
 chown -R www-data:www-data /etc/fusionpbx
 cp fusionpbx/config.php /etc/fusionpbx
+sed -i /etc/fusionpbx/config.php -e s:"{database_host}:$database_host:"
 sed -i /etc/fusionpbx/config.php -e s:'{database_username}:fusionpbx:'
 sed -i /etc/fusionpbx/config.php -e s:"{database_password}:$database_password:"
 

+ 1 - 1
ubuntu/resources/fusionpbx/config.php

@@ -32,7 +32,7 @@
 	//$db_path = '/var/www/fusionpbx/secure'; //the path is determined by a php variable
 
 //pgsql: database connection information
-	$db_host = 'localhost'; //set the host only if the database is not local
+	$db_host = '{database_host}';
 	$db_port = '5432';
 	$db_name = 'fusionpbx';
 	$db_username = '{database_username}';