Changeset 8108

Show
Ignore:
Timestamp:
08/23/09 20:30:48 (4 years ago)
Author:
p_lindheimer
Message:

closes #3577 pull amportal.conf location from ENV

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.6/backup/bin/dumpastdb.php

    r7470 r8108  
    3030} 
    3131 
    32 $amp_conf = getconf("/etc/amportal.conf"); 
     32$amportalconf = (isset($_ENV["FREEPBXCONFIG"]) && strlen($_ENV["FREEPBXCONFIG"])) ? $_ENV["FREEPBXCONFIG"] : "/etc/amportal.conf"; 
     33$amp_conf = getconf($amportalconf); 
     34 
     35if (isset($amp_conf["ASTMANAGERHOST"])) { 
     36  $amp_conf["ASTMANAGERHOST"] = '127.0.0.1'; 
     37
     38if (isset($amp_conf["ASTMANAGERPORT"])) { 
     39  $amp_conf["ASTMANAGERPORT"] = '5038'; 
     40
    3341 
    3442require_once($amp_conf['AMPWEBROOT']."/admin/common/php-asmanager.php"); 
    3543$astman         = new AGI_AsteriskManager(); 
    36 if (! $res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 
     44if (! $res = $astman->connect($amp_conf["ASTMANAGERHOST"] . ":".$amp_conf["ASTMANAGERPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 
    3745        unset( $astman ); 
    3846} 
  • modules/branches/2.6/backup/bin/restoreastdb.php

    r7470 r8108  
    4343} 
    4444 
    45 $amp_conf = getconf("/etc/amportal.conf"); 
     45# Get configuration 
     46$amportalconf = (isset($_ENV["FREEPBXCONFIG"]) && strlen($_ENV["FREEPBXCONFIG"])) ? $_ENV["FREEPBXCONFIG"] : "/etc/amportal.conf"; 
     47$amp_conf = getconf($amportalconf); 
     48 
     49if (isset($amp_conf["ASTMANAGERHOST"])) { 
     50  $amp_conf["ASTMANAGERHOST"] = '127.0.0.1'; 
     51
     52if (isset($amp_conf["ASTMANAGERPORT"])) { 
     53  $amp_conf["ASTMANAGERPORT"] = '5038'; 
     54
    4655 
    4756require_once($amp_conf['AMPWEBROOT']."/admin/common/php-asmanager.php"); 
    4857 
    4958$astman         = new AGI_AsteriskManager(); 
    50 if (! $res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 
     59if (! $res = $astman->connect($amp_conf["ASTMANAGERHOST"] . ":".$amp_conf["ASTMANAGERPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 
    5160        unset( $astman ); 
    5261} 
  • modules/branches/2.6/backup/module.xml

    r8063 r8108  
    22  <rawname>backup</rawname> 
    33  <name>Backup &amp; Restore</name> 
    4   <version>2.6.0.1</version> 
     4  <version>2.6.0.2</version> 
    55  <publisher>FreePBX</publisher> 
    66  <license>GPLv2+</license> 
     
    1515  </depends> 
    1616  <changelog> 
     17    *2.6.0.2* #3577 
    1718    *2.6.0.1* added publisher/lic 
    1819    *2.6.0.0* #3224, #3640