make database host dynamic. (#334)
Co-authored-by: Gill Abada <gill@callifi.com>
This commit is contained in:
parent
5d3a0d2624
commit
278e65c2e1
|
|
@ -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:"
|
||||
|
||||
|
|
|
|||
|
|
@ -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}';
|
||||
|
|
|
|||
|
|
@ -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:"
|
||||
|
||||
|
|
|
|||
|
|
@ -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}';
|
||||
|
|
|
|||
|
|
@ -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:"
|
||||
|
||||
|
|
|
|||
|
|
@ -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}';
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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}';
|
||||
|
|
|
|||
|
|
@ -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:"
|
||||
|
||||
|
|
|
|||
|
|
@ -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}';
|
||||
|
|
|
|||
Loading…
Reference in New Issue