Show
Ignore:
Timestamp:
05/04/12 11:26:35 (1 year ago)
Author:
p_lindheimer
Message:

revert r12549 merged in error as well as remove undefined index all re #5692 which may fix issues but needs testing

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.10/install_amp

    r13071 r14052  
    967967$tmpoutput = array(); 
    968968$tmpout = exec("getenforce 2>/dev/null", $tmpoutput, $sereturn); 
    969 if (strtolower($tmpoutput[0]) === "enabled") { 
     969if (isset($tmpoutput[0]) && strtolower($tmpoutput[0]) === "enabled") { 
    970970        // this method seems better because disabled and permissive are the same 
    971971        // if a user installs and realizes selinux is running the other method  
     
    11011101} 
    11021102 
    1103  
    1104 // Ensure executables are executable 
    1105 chmod($amp_conf["AMPBIN"]."/freepbx_setting", 0755); 
    1106 outn("Configuring install for your environment.."); 
    1107 exec($amp_conf["AMPBIN"]."/freepbx_setting AMPASTERISKWEBGROUP $runas_gid"); 
    1108 exec($amp_conf["AMPBIN"]."/freepbx_setting AMPASTERISKWEBUSER $runas_uid"); 
    1109 exec($amp_conf["AMPBIN"]."/freepbx_setting AMPASTERISKGROUP $runas_gid"); 
    1110 exec($amp_conf["AMPBIN"]."/freepbx_setting AMPASTERISKUSER $runas_uid"); 
    1111 exec($amp_conf["AMPBIN"]."/freepbx_setting AMPDEVGROUP $runas_gid"); 
    1112 exec($amp_conf["AMPBIN"]."/freepbx_setting AMPDEVUSER $runas_uid"); 
    11131103if (!$dryrun) { 
    11141104  $asteriskuser = isset($amp_conf['AMPASTERISKUSER']) && $amp_conf['AMPASTERISKUSER'] ? $amp_conf['AMPASTERISKUSER'] : 'asterisk'; 
     
    11321122    outn("no freepbx_engine.."); 
    11331123  } 
    1134   // TODO: we just did this above 
    11351124  if (file_exists($amp_conf["AMPBIN"]."/freepbx_setting")) { 
    11361125    exec("chmod 755 ".$amp_conf["AMPBIN"]."/freepbx_setting"); 
     
    11461135  } 
    11471136  out("done"); 
    1148   // Note - freepbx_engine must be run to ensure that freepbx.conf exists. 
    1149   exec($amp_conf["AMPBIN"]."/freepbx_engine error > /dev/null"); 
     1137 
    11501138  // Ensure UIDs are set correctly before any chowns happen 
     1139  // Note - freepbx_engine must be used the first time to ensure that freepbx.conf exists. 
     1140  exec($amp_conf["AMPBIN"]."/freepbx_engine admin freepbx_setting AMPASTERISKWEBGROUP $runas_gid"); 
    11511141  exec($amp_conf["AMPBIN"]."/freepbx_setting AMPASTERISKWEBGROUP $runas_gid"); 
    11521142  exec($amp_conf["AMPBIN"]."/freepbx_setting AMPASTERISKWEBUSER $runas_uid");