Changeset 2742

Show
Ignore:
Timestamp:
10/16/06 12:17:14 (7 years ago)
Author:
p_lindheimer
Message:

don't run module/isntall.xxx scripts each time retrieve_conf is run, but keep that behavior with install_amp since it maybe needed at that point

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/bin/retrieve_conf

    r2728 r2742  
    9898 
    9999$shortopts = "h?u:p:"; 
    100 $longopts = array("help","debug","dry-run"); 
     100$longopts = array("help","debug","dry-run","run-install"); 
    101101 
    102102$args = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), $shortopts, $longopts); 
     
    109109$debug = false; 
    110110$dryrun = false; 
     111$run_install = false; 
    111112 
    112113foreach ($args[0] as $arg) { 
     
    123124      $debug = true; 
    124125      debug("Debug mode enabled"); 
     126    break; 
     127    case "--run-install": 
     128      $run_install = true; 
     129      out("Running module install.php and install.sql scripts"); 
    125130    break; 
    126131  } 
     
    237242    if (isset($module['status']) && $module['status'] == MODULE_STATUS_ENABLED) { 
    238243      // Make sure the module is installed and up to date 
    239       module_install($key); 
     244      if ($run_install) module_install($key); 
    240245      // active_modules array used in genConf function 
    241246      $active_modules[] = $key; 
  • freepbx/trunk/install_amp

    r2713 r2742  
    431431  out("Generating Configurations.conf.."); 
    432432  if (!$dryrun) 
    433     passthru("su - asterisk -c \"".trim($amp_conf["AMPBIN"])."/retrieve_conf ".($debug ? ' --debug' : '').'"'); 
     433    // added --run-install to make it work like it has been working since retrieve_conf changed to not run module install scripts by default 
     434    passthru("su - asterisk -c \"".trim($amp_conf["AMPBIN"])."/retrieve_conf --run-install ".($debug ? ' --debug' : '').'"'); 
    434435} 
    435436