Changeset 12462

Show
Ignore:
Timestamp:
08/30/11 14:14:48 (2 years ago)
Author:
mickecarlsson
Message:

Close #5084, merge X-Robs install_amp into FreePBX install_amp and clean it up

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/install_amp

    r12411 r12462  
    7777  $file = file($filename); 
    7878  foreach ($file as $line) { 
    79     if (preg_match("/^\s*([a-zA-Z0-9]+)\s*=\s*(.*)\s*([;#].*)?/",$line,$matches)) {  
     79    if (preg_match("/^\s*([a-zA-Z0-9]+)\s*=\s*(.*)\s*([;#].*)?/",$line,$matches)) { 
    8080      $conf[ $matches[1] ] = $matches[2]; 
    8181    } 
     
    8686    $conf["AMPDBENGINE"] = "mysql"; 
    8787  } 
    88    
     88 
    8989  if ( !isset($conf["AMPDBNAME"]) || ($conf["AMPDBNAME"] == "")) { 
    9090    $conf["AMPDBNAME"] = "asterisk"; 
    9191  } 
    92    
     92 
    9393  if ( !isset($conf["AMPENGINE"]) || ($conf["AMPENGINE"] == "")) { 
    9494    $conf["AMPENGINE"] = "asterisk"; 
     
    101101  $file = file($filename); 
    102102  foreach ($file as $line) { 
    103     if (preg_match("/^\s*([a-zA-Z0-9]+)\s* => \s*(.*)\s*([;#].*)?/",$line,$matches)) {  
     103    if (preg_match("/^\s*([a-zA-Z0-9]+)\s* => \s*(.*)\s*([;#].*)?/",$line,$matches)) { 
    104104      $conf[ $matches[1] ] = $matches[2]; 
    105105    } 
     
    133133    } 
    134134  } 
    135    
    136135  // add new entries 
    137136  foreach ($conf as $key=>$val) { 
    138137    $file[] = $key."=".$val."\n"; 
    139138  } 
    140    
     139 
    141140  // write the file 
    142141  if (!$fd = fopen($filename, "w")) { 
     
    154153    $key = fgets(STDIN,1024); 
    155154    switch (strtolower($key[0])) { 
    156       case "y": return true;  
     155      case "y": return true; 
    157156      case "a": $check_md5s=false; return true; 
    158157      case "n": return false; 
    159       case "d":  
     158      case "d": 
    160159        out(""); 
    161160        // w = ignore whitespace, u = unified 
     
    169168          out("-> Original file:  ".$file2); 
    170169          out("-> New file:       ".$file1); 
    171            
    172170          $pid = pcntl_fork(); 
    173171          if ($pid == -1) { 
     
    180178            pcntl_exec($shell, array(), $_ENV); 
    181179          } 
    182            
    183180          out("Returned from shell"); 
    184181        } else { 
    185182          out("[ERROR] PHP not built with process control (--enable-pcntl) support: cannot spawn shell"); 
    186183        } 
    187          
    188       break; 
    189       case "x":  
     184      break; 
     185      case "x": 
    190186        out("-> Original file:  ".$file2); 
    191187        out("-> New file:       ".$file1); 
     
    205201  global $debug; 
    206202  global $runas_uid; 
    207    
     203 
    208204  out("Generating Configurations.conf, (if Asterisk is not running, you will get an error"); 
    209205  out("In case of error, start Asterisk and hit the red bar in the GUI to generate the Configurations.conf files"); 
     
    234230 
    235231  out("Creating new $filename"); 
    236    
     232 
    237233  if ($scripted == true) { 
    238234    # Scripted install. Everything should have been set for us, don't ask questions. 
     
    262258    return; 
    263259  } 
    264      
     260 
    265261  outn("Enter your USERNAME to connect to the '$dbname' database:\n [".($dbuser ? $dbuser : $asterisk_user) . "] "); 
    266262  $key = trim(fgets(STDIN,1024)); 
    267   if (preg_match('/^$/',$key))  
     263  if (preg_match('/^$/',$key)) 
    268264    $amp_conf["AMPDBUSER"] = ($dbuser ? $dbuser : $asterisk_user); 
    269   else  
     265  else 
    270266    $amp_conf["AMPDBUSER"] = $key; 
    271    
     267 
    272268  outn("Enter your PASSWORD to connect to the '$dbname' database:\n [".($dbpass ? $dbpass : $asterisk_pass)."] "); 
    273269  $key = trim(fgets(STDIN,1024)); 
    274   if (preg_match('/^$/',$key))  
     270  if (preg_match('/^$/',$key)) 
    275271    $amp_conf["AMPDBPASS"] = ($dbpass ? $dbpass : $asterisk_pass); 
    276   else  
     272  else 
    277273    $amp_conf["AMPDBPASS"] = $key; 
    278    
     274 
    279275  outn("Enter the hostname of the '$dbname' database:\n [".($dbhost ? $dbhost : "localhost")."] "); 
    280276  $key = trim(fgets(STDIN,1024)); 
    281   if (preg_match('/^$/',$key))  
     277  if (preg_match('/^$/',$key)) 
    282278    $amp_conf["AMPDBHOST"] = ($dbhost ? $dbhost : "localhost"); 
    283   else  
     279  else 
    284280    $amp_conf["AMPDBHOST"] = $key; 
    285    
     281 
    286282  outn("Enter a USERNAME to connect to the Asterisk Manager interface:\n [admin] "); 
    287283  $key = trim(fgets(STDIN,1024)); 
    288284  if (preg_match('/^$/',$key)) $amp_conf["AMPMGRUSER"] = "admin"; 
    289285  else $amp_conf["AMPMGRUSER"] = $key; 
    290    
     286 
    291287  outn("Enter a PASSWORD to connect to the Asterisk Manager interface:\n [amp111] "); 
    292288  $key = trim(fgets(STDIN,1024)); 
    293289  if (preg_match('/^$/',$key)) $amp_conf["AMPMGRPASS"] = "amp111"; 
    294290  else $amp_conf["AMPMGRPASS"] = $key; 
    295    
     291 
    296292  do { 
    297293    out("Enter the path to use for your AMP web root:\n [$webroot] "); 
    298294    $key = trim(fgets(STDIN,1024)); 
    299     if (preg_match('/^$/',$key))  
     295    if (preg_match('/^$/',$key)) 
    300296      $amp_conf["AMPWEBROOT"] = "$webroot"; 
    301     else  
     297    else 
    302298      $amp_conf["AMPWEBROOT"] = rtrim($key,'/'); 
    303299 
     
    311307    } 
    312308  } while(1); 
    313    
     309 
    314310  // Really no need to ask, is there. 
    315311  if (empty($fopwebroot)) 
     
    317313  else 
    318314    $amp_conf["FOPWEBROOT"] = $fopwebroot; 
    319    
     315 
    320316  outn("Enter the IP ADDRESS or hostname used to access the AMP web-admin:\n [$freepbxip] "); 
    321317  $key = trim(fgets(STDIN,1024)); 
    322318  if (preg_match('/^$/',$key)) $amp_conf["AMPWEBADDRESS"] = $freepbxip; 
    323319  else $amp_conf["AMPWEBADDRESS"] = $key; 
    324    
     320 
    325321  outn("Enter a PASSWORD to perform call transfers with the Flash Operator Panel:\n [passw0rd] "); 
    326322  $key = trim(fgets(STDIN,1024)); 
    327323  if (preg_match('/^$/',$key)) $amp_conf["FOPPASSWORD"] = "passw0rd"; 
    328324  else $amp_conf["FOPPASSWORD"] = $key; 
    329    
     325 
    330326  outn("Use simple Extensions [extensions] admin or separate Devices and Users [deviceanduser]?\n [extensions] "); 
    331327  $key = trim(fgets(STDIN,1024)); 
    332328  if (preg_match('/^$/',$key)) $amp_conf["AMPEXTENSIONS"] = "extensions"; 
    333329  else $amp_conf["AMPEXTENSIONS"] = $key; 
    334    
     330 
    335331  do { 
    336332    out("Enter directory in which to store AMP executable scripts:\n [$ampbin_dir] "); 
    337333    $key = trim(fgets(STDIN,1024)); 
    338     if (preg_match('/^$/',$key))  
     334    if (preg_match('/^$/',$key)) 
    339335      $amp_conf["AMPBIN"] = $ampbin_dir; 
    340     else  
     336    else 
    341337      $amp_conf["AMPBIN"] = rtrim($key,'/'); 
    342338 
     
    350346    } 
    351347  } while(1); 
    352    
     348 
    353349  do { 
    354350    out("Enter directory in which to store super-user scripts:\n [$ampsbin_dir] "); 
    355351    $key = trim(fgets(STDIN,1024)); 
    356     if (preg_match('/^$/',$key))  
     352    if (preg_match('/^$/',$key)) 
    357353      $amp_conf["AMPSBIN"] = "$ampsbin_dir"; 
    358     else  
     354    else 
    359355      $amp_conf["AMPSBIN"] = rtrim($key,'/'); 
    360356 
     
    368364    } 
    369365  } while(1); 
    370    
     366 
    371367  // write amportal.conf 
    372368  write_amportal_conf($filename, $amp_conf); 
     
    448444        // 
    449445        switch ($up_module) { 
    450         case 'framework': 
    451         case 'fw_ari': 
    452         case 'fw_fop': 
    453           system($amp_conf['AMPBIN']."/module_admin --no-warnings -f install $up_module"); 
    454           out("installed"); 
     446        case 'framework': 
     447        case 'fw_ari': 
     448        case 'fw_fop': 
     449          system($amp_conf['AMPBIN']."/module_admin --no-warnings -f install $up_module"); 
     450          out("installed"); 
    455451          break; 
    456         default: 
    457           system($amp_conf['AMPBIN']."/module_admin --no-warnings -f install $up_module"); 
    458           system($amp_conf['AMPBIN']."/module_admin --no-warnings -f enable $up_module"); 
    459           out("installed"); 
     452        default: 
     453          system($amp_conf['AMPBIN']."/module_admin --no-warnings -f install $up_module"); 
     454          system($amp_conf['AMPBIN']."/module_admin --no-warnings -f enable $up_module"); 
     455          out("installed"); 
    460456        } 
    461457        unset($included_modules[$id]); 
     
    464460      } 
    465461    } 
    466     } 
     462  } 
    467463} 
    468464 
     
    497493  // 
    498494  $sql = "SELECT version FROM modules WHERE modulename = '$module'"; 
    499   $result = $db->getCol($sql);  
    500   if(DB::IsError($result)) {      
    501     fatal("error accessing version table: ".$result->getMessage());  
     495  $result = $db->getCol($sql); 
     496  if(DB::IsError($result)) { 
     497    fatal("error accessing version table: ".$result->getMessage()); 
    502498  } 
    503499  $sql = ""; 
     
    519515  if ($sql) { 
    520516    debug($sql); 
    521     $result = $db->query($sql);  
    522     if(DB::IsError($result)) {      
    523       fatal("error writing to version table: ".$result->getMessage());  
     517    $result = $db->query($sql); 
     518    if(DB::IsError($result)) { 
     519      fatal("error writing to version table: ".$result->getMessage()); 
    524520    } 
    525521    return "updated to $version"; 
     
    555551  register_shutdown_function( create_function( '' , 'fclose(STDIN); fclose(STDOUT); fclose(STDERR); return true;' ) ); 
    556552} 
    557     
     553 
    558554// **** Make sure we have PEAR's DB.php, and include it 
    559555 
     
    597593 
    598594//initialize variables to avoid php notices 
    599 $dbhost = null;  
    600 $dbname = 'asterisk';  
     595$dbhost = null; 
     596$dbname = 'asterisk'; 
    601597$new_username = null; 
    602598$new_password = null; 
     
    612608      showHelp(); 
    613609      exit(10); 
    614     break; 
     610    break; 
    615611    case "--dry-run": 
    616612      out("Dry-run only, nothing will be changed"); 
    617613      $dryrun = true; 
    618     break; 
     614    break; 
    619615    case "--debug": 
    620616      $debug = true; 
    621617      debug("Debug mode enabled"); 
    622     break; 
     618    break; 
    623619    case "--username": case "u": 
    624620      out("Using username: ".$arg[1]); 
    625621      $new_username = $arg[1]; 
    626     break; 
     622    break; 
    627623    case "--password": case "p": 
    628624      out("Using password: ".str_repeat("*",strlen($arg[1]))); 
    629625      $new_password = $arg[1]; 
    630     break; 
     626    break; 
    631627    case "--force-version": 
    632628      $version = $arg[1]; 
    633629      out("Forcing upgrade from version ".$version); 
    634     break; 
     630    break; 
    635631    case "--dbhost": 
    636632      $dbhost = $arg[1]; 
    637633      out("Using remote database server at ".$dbhost); 
    638     break; 
     634    break; 
    639635    case "--dbname": 
    640636      $dbname = $arg[1]; 
    641637      out("Using database ".$dbname); 
    642     break; 
     638    break; 
    643639    case "--no-files": 
    644640      $install_files = false; 
    645641      out("Running upgrade only, without installing files."); 
    646     break; 
     642    break; 
    647643    case "--force-overwrite": 
    648       $check_md5s = false; 
     644     $check_md5s = false; 
    649645      out("Overwriting all files including modified ones."); 
    650     break; 
     646    break; 
    651647    case "--my-svn-is-correct": 
    652648      $override_astvers = true; 
    653     break; 
     649    break; 
    654650    case "--engine": 
    655651      if ($arg[1] != 'asterisk') { 
     
    657653      } 
    658654      $pbx_engine = $arg[1]; 
    659     break; 
     655    break; 
    660656    case "--install-moh": 
    661657      $install_moh = true; 
    662     break; 
     658    break; 
    663659    case "--install-fop": 
    664660      if(strtolower($arg[1]) == "false")  { 
     
    668664        out("FOP will be installed and activated."); 
    669665      } 
    670     break; 
     666    break; 
    671667    case "--make-links-devel": 
    672668    case "--dev-links": 
    673669      $make_links = true; 
    674     break; 
     670    break; 
    675671    case "--skip-module-install": 
    676672      $module_install = false; 
    677     break; 
     673    break; 
    678674    case "--fopwebroot": 
    679675      $fopwebroot = $arg[1]; 
    680676      out("Using fop at ".$fopwebroot); 
    681     break; 
     677    break; 
    682678    case "--webroot": 
    683679      $webroot = $arg[1]; 
    684680      out("Using Webroot at ".$webroot); 
    685     break; 
     681    break; 
    686682    case "--cgibin": 
    687683      $cgibin = $arg[1]; 
    688684      out("Using CGI-BIN at ".$cgibin); 
    689     break; 
     685    break; 
    690686    case "--bin": 
    691687      $ampbin_dir = $arg[1]; 
    692688      out("Using bin at ".$ampbin_dir); 
    693     break; 
     689    break; 
    694690    case "--sbin": 
    695691      $ampsbin_dir = $arg[1]; 
    696692      out("Using sbin at ".$ampsbin_dir); 
    697     break; 
     693    break; 
    698694    case "--asteriskuser": 
    699695      $asterisk_user = $arg[1]; 
    700696      out("Using Asterisk user ".$asterisk_user); 
    701     break; 
     697    break; 
    702698    case "--asteriskpass": 
    703699      $asterisk_pass = $arg[1]; 
    704700      out("Using asteriskpass ".str_repeat("*",strlen($arg[1]))); 
    705     break; 
     701    break; 
    706702    case "--uid": 
    707703      $runas_uid = $arg[1]; 
    708704      out("Setting ownership (user) to ".$runas_uid); 
    709     break; 
     705    break; 
    710706    case "--gid": 
    711707      $runas_gid = $arg[1]; 
    712708      out("Setting ownership (group) to ".$runas_gid); 
    713     break; 
     709    break; 
    714710    case "--scripted": 
    715711      $scripted = true; 
    716712      out("Unattended installation. No questions will be asked"); 
    717     break; 
     713    break; 
    718714    case "--freepbxip": 
    719       $freepbxip = $arg[1];  
     715      $freepbxip = $arg[1]; 
    720716      out("Setting IP address of web interface to $freepbxip"); 
    721     break; 
     717    break; 
    722718    case "--asteriskip": 
    723       $asteriskip = $arg[1];  
     719      $asteriskip = $arg[1]; 
    724720      out("Setting IP address of asterisk to $asteriskip"); 
    725     break; 
    726  
     721      break; 
    727722 
    728723  } 
     
    764759  // this file contains password and should not be a+r 
    765760  // this addresses http://freepbx.org/trac/ticket/1878 
    766   chown(AMP_CONF, $runas_uid);  
    767   chgrp(AMP_CONF, $runas_gid);  
    768   chmod(AMP_CONF, 0640);  
     761  chown(AMP_CONF, $runas_uid); 
     762  chgrp(AMP_CONF, $runas_gid); 
     763  chmod(AMP_CONF, 0640); 
    769764 
    770765  collect_settings(AMP_CONF, $dbhost, $new_username, $new_password, $dbname); 
     
    840835if (isset($amp_conf['FOPDISABLE']) && (strtolower(trim($amp_conf['FOPDISABLE'])) == 'true' || strtolower(trim($amp_conf['FOPDISABLE'])) == 'yes' || strtolower(trim($amp_conf['FOPDISABLE'])) == 'y') )  { 
    841836  $install_fop = false; 
    842 }   
     837} 
    843838// write amportal.conf 
    844839// TODO: if we boostrapped we don't want to write amportal.conf, or do we? e.g. if we are running out of the file vs. the 
     
    924919  $asterisk_version = $matches[1]; 
    925920 
    926 } elseif (preg_match('/^Asterisk ([ABC]\.\d+(\.\d+)*)(-?(.*))$/', $verinfo, $matches)) {  
     921} elseif (preg_match('/^Asterisk ([ABC]\.\d+(\.\d+)*)(-?(.*))$/', $verinfo, $matches)) { 
    927922  if (substr($matches[1], 0, 1) == "A") { 
    928923    fatal("Asterisk Business Edition B or C is required for this version of FreePBX. Detected version is: ".$matches[1]); 
     
    956951if (strtolower($tmpoutput[0]) === "enabled") { 
    957952        // this method seems better because disabled and permissive are the same 
    958         // if a user installs and realizes selinux is running the other method  
     953        // if a user installs and realizes selinux is running the other method 
    959954        // requires a reboot to get selinuxenabled to work after editing the  selinux config 
    960955        // this will allow you to use setenforce 0 which turns selinux into permissive mode which 
     
    978973$db_name = $amp_conf["AMPDBNAME"]; 
    979974 
    980 // we still support older configurations,  and fall back  
     975// we still support older configurations,  and fall back 
    981976// into mysql when no other engine is defined 
    982977if ($db_engine == "") 
     
    984979  $db_engine = "mysql"; 
    985980} 
    986    
    987981switch ($db_engine) 
    988982{ 
    989983  case "pgsql": 
    990984  case "mysql": 
    991     // datasource in in this style: dbengine://username:password@host/database  
     985    // datasource in in this style: dbengine://username:password@host/database 
    992986    if (!function_exists($db_engine.'_connect')) { 
    993987      out("FAILED"); 
    994988      fatal($db_engine." PHP libraries not installed"); 
    995989    } 
    996    
    997990    $datasource = $db_engine.'://'.$db_user.':'.$db_pass.'@'.$db_host.'/'.$db_name; 
    998991    $db = DB::connect($datasource); // attempt connection 
    999992    break; 
    1000    
    1001993  case "sqlite": 
    1002994    die_freepbx("SQLite2 support is deprecated. Please use sqlite3 only."); 
    1003995    break; 
    1004    
    1005996  case "sqlite3": 
    1006997    if (!isset($amp_conf["AMPDBFILE"])) 
    1007998      die("You must setup properly AMPDBFILE in /etc/amportal.conf"); 
    1008        
    1009999    if (isset($amp_conf["AMPDBFILE"]) == "") 
    10101000      die("AMPDBFILE in /etc/amportal.conf cannot be blank"); 
    1011  
    10121001    /* on centos this extension is not loaded by default */ 
    10131002    if (! extension_loaded('sqlite3.so')  && ! extension_loaded('SQLITE3')) 
    10141003      dl('sqlite3.so'); 
    1015  
    1016     if (! @require_once('DB/sqlite3.php') ) 
    1017     { 
     1004    if (! @require_once('DB/sqlite3.php') ) { 
    10181005      out("FAILED"); 
    10191006      fatal( "Your PHP installation has no PEAR/SQLite3 support. Please install php-sqlite3 and php-pear."); 
    10201007    } 
    1021  
    10221008    $datasource = "sqlite3:///" . $amp_conf["AMPDBFILE"] . "?mode=0666"; 
    10231009    $db = DB::connect($datasource); 
    10241010    break; 
    1025  
    10261011  default: 
    10271012    die( "Unknown SQL engine: [$db_engine]"); 
     
    10331018  out("Try running ".$argv[0]." --username=user --password=pass  (using your own user and pass)"); 
    10341019  fatal("Cannot connect to database"); 
    1035    
     1020 
    10361021} 
    10371022out("OK"); 
     
    10561041// is not there. 
    10571042// 
    1058 $sql = "SELECT count(*) FROM freepbx_settings";  
    1059 $num_settings = $db->getOne($sql);  
     1043$sql = "SELECT count(*) FROM freepbx_settings"; 
     1044$num_settings = $db->getOne($sql); 
    10601045$force_amportal_conf = DB::IsError($num_settings) || $num_settings < 5; 
    10611046 
     
    10741059  // link the packed js library for ARI, if there the error will indicate that 
    10751060  $libfreepbx = $amp_conf['AMPWEBROOT'].'/admin/common/libfreepbx.javascripts.js'; 
    1076   $dest_libfreepbx = $amp_conf['AMPWEBROOT'].'/recordings/theme/js/libfreepbx.javascripts.js';  
     1061  $dest_libfreepbx = $amp_conf['AMPWEBROOT'].'/recordings/theme/js/libfreepbx.javascripts.js'; 
    10771062  if (!file_exists($amp_conf['AMPWEBROOT'].'/recordings/theme/js')) { 
    10781063  mkdir($amp_conf['AMPWEBROOT'].'/recordings/theme/js',0755, true); 
     
    10891074 
    10901075// **** Apply amportal.conf configuration to files 
    1091 if (file_exists(dirname(__FILE__)."/apply_conf.sh")) {  
    1092   debug("Running ".dirname(__FILE__)."/apply_conf.sh"); 
     1076if (file_exists(dirname(__FILE__)."/apply_conf.sh")) { 
     1077  debug("Running ".dirname(__FILE__)."/apply_conf.sh"); 
    10931078} 
    10941079 
     
    11421127  // 
    11431128  outn("apply username/password changes to conf files.."); 
    1144   if (file_exists(dirname(__FILE__)."/apply_conf.sh")) {  
     1129  if (file_exists(dirname(__FILE__)."/apply_conf.sh")) { 
    11451130    if ($force_amportal_conf) { 
    11461131      putenv('FORCE_AMPORTAL_CONF=1'); 
    1147     exec(dirname(__FILE__)."/apply_conf.sh ".AMP_CONF); 
     1132    exec(dirname(__FILE__)."/apply_conf.sh ".AMP_CONF); 
    11481133      putenv('FORCE_AMPORTAL_CONF='); 
    11491134    } else { 
    1150     exec(dirname(__FILE__)."/apply_conf.sh"); 
     1135    exec(dirname(__FILE__)."/apply_conf.sh"); 
    11511136    } 
    11521137  } 
     
    11541139 
    11551140  /* As of Asterisk 1.4.16 or there about, a missing #include file will make the reload fail. So 
    1156     we need to make sure that we have such for everything that is in our configs. We will simply 
    1157      look for the #include statements and touch the files vs. trying to inventory everything we may 
    1158      need and then forgetting something. 
     1141  we need to make sure that we have such for everything that is in our configs. We will simply 
     1142  look for the #include statements and touch the files vs. trying to inventory everything we may 
     1143  need and then forgetting something. 
    11591144  */ 
    1160    
     1145 
    11611146  outn("creating missing #include files.."); 
    11621147  $include_err = false; 
     
    11821167    if (!file_exists($target)) { 
    11831168      exec("sudo -u $asteriskuser touch $target", $output, $retcode); 
    1184       if ($retcode != 0) { 
     1169      if ($retcode != 0) { 
    11851170        out("Error code $retcode: trying to create empty file $target"); 
    11861171        $include_err = true; 
     
    12171202  outn("Setting permissions on files.."); 
    12181203  if (!$dryrun) { 
    1219     if ($force_amportal_conf) { 
    1220       putenv('FORCE_AMPORTAL_CONF=1'); 
    1221    
     1204   if ($force_amportal_conf) { 
     1205   putenv('FORCE_AMPORTAL_CONF=1'); 
     1206   
    12221207    exec($amp_conf["AMPSBIN"]."/amportal chown"); 
    1223     if ($force_amportal_conf) { 
    1224       putenv('FORCE_AMPORTAL_CONF='); 
    1225    
     1208   if ($force_amportal_conf) { 
     1209     putenv('FORCE_AMPORTAL_CONF='); 
     1210   
    12261211  } 
    12271212  out("OK"); 
     
    12801265out("* upgrade is in progress.                                               *",false); 
    12811266out("*************************************************************************",false); 
    1282 // vim: set ts=4 sw=4 : // 
    1283 // Ensure you 'set modeline' in your ~/.vimrc to activate this // 
    12841267?>