Changeset 727

Show
Ignore:
Timestamp:
10/27/05 15:47:07 (8 years ago)
Author:
rcourtna
Message:

allow for a customized asterisk.conf, rather than always overwritting durring upgrade

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/AMP-1-10-010/AMP/install_amp

    r708 r727  
    420420   
    421421  do { 
    422     outn("Enter the path to use for your AMP web root:\n [/var/www/html] "); 
     422    out("Enter the path to use for your AMP web root:\n [/var/www/html] "); 
    423423    $key = trim(fgets(STDIN,1024)); 
    424424    if (preg_match('/^$/',$key)) $amp_conf["AMPWEBROOT"] = "/var/www/html"; 
     
    427427      break; 
    428428    } else if (mkdir($amp_conf["AMPWEBROOT"],755)){ 
    429       outn("Created ".$amp_conf["AMPWEBROOT"]); 
     429      out("Created ".$amp_conf["AMPWEBROOT"]); 
    430430      break; 
    431431    } else { 
     
    435435   
    436436  do { 
    437     outn("Enter the path to use for your FOP web root:\n [/var/www/html/panel] "); 
     437    out("Enter the path to use for your FOP web root:\n [/var/www/html/panel] "); 
    438438    $key = trim(fgets(STDIN,1024)); 
    439439    if (preg_match('/^$/',$key)) $amp_conf["FOPWEBROOT"] = "/var/www/html/panel"; 
     
    442442      break; 
    443443    } else if (mkdir($amp_conf["FOPWEBROOT"],755)){ 
    444       outn("Created ".$amp_conf["FOPWEBROOT"]); 
     444      out("Created ".$amp_conf["FOPWEBROOT"]); 
    445445      break; 
    446446    } else { 
     
    474474   
    475475  do { 
    476     outn("Enter directory in which to store AMP executable scripts:\n [/var/lib/asterisk/bin] "); 
     476    out("Enter directory in which to store AMP executable scripts:\n [/var/lib/asterisk/bin] "); 
    477477    $key = trim(fgets(STDIN,1024)); 
    478478    if (preg_match('/^$/',$key)) $amp_conf["AMPBIN"] = "/var/lib/asterisk/bin"; 
     
    481481      break; 
    482482    } else if (mkdir($amp_conf["AMPBIN"],755)){ 
    483       outn("Created ".$amp_conf["AMPBIN"]); 
     483      out("Created ".$amp_conf["AMPBIN"]); 
    484484      break; 
    485485    } else { 
     
    489489   
    490490  do { 
    491     outn("Enter directory in which to store super-user scripts:\n [/usr/sbin] "); 
     491    out("Enter directory in which to store super-user scripts:\n [/usr/sbin] "); 
    492492    $key = trim(fgets(STDIN,1024)); 
    493493    if (preg_match('/^$/',$key)) $amp_conf["AMPSBIN"] = "/usr/sbin"; 
     
    496496      break; 
    497497    } else if (mkdir($amp_conf["AMPSBIN"],755)){ 
    498       outn("Created ".$amp_conf["AMPSBIN"]); 
     498      out("Created ".$amp_conf["AMPSBIN"]); 
    499499      break; 
    500500    } else { 
     
    637637} 
    638638 
     639// **** Check for amportal.conf, create if necessary 
     640 
     641outn("Checking for ".ASTERISK_CONF.".."); 
     642if (!file_exists(ASTERISK_CONF)) { 
     643  out(ASTERISK_CONF." does not exist, copying default"); 
     644  copy("asterisk.conf", "/etc/asterisk/asterisk.conf"); 
     645  //TODO - need to prompt for asterisk specific directories - using * defaults for now 
     646  //collect_ast_settings(ASTERISK_CONF, $dbhost, $new_username, $new_password); 
     647} 
     648out("OK"); 
     649 
    639650// **** read asterisk.conf 
    640651