Changeset 14052 for freepbx/branches/2.10/install_amp
- Timestamp:
- 05/04/12 11:26:35 (1 year ago)
- Files:
-
- freepbx/branches/2.10/install_amp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.10/install_amp
r13071 r14052 967 967 $tmpoutput = array(); 968 968 $tmpout = exec("getenforce 2>/dev/null", $tmpoutput, $sereturn); 969 if ( strtolower($tmpoutput[0]) === "enabled") {969 if (isset($tmpoutput[0]) && strtolower($tmpoutput[0]) === "enabled") { 970 970 // this method seems better because disabled and permissive are the same 971 971 // if a user installs and realizes selinux is running the other method … … 1101 1101 } 1102 1102 1103 1104 // Ensure executables are executable1105 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");1113 1103 if (!$dryrun) { 1114 1104 $asteriskuser = isset($amp_conf['AMPASTERISKUSER']) && $amp_conf['AMPASTERISKUSER'] ? $amp_conf['AMPASTERISKUSER'] : 'asterisk'; … … 1132 1122 outn("no freepbx_engine.."); 1133 1123 } 1134 // TODO: we just did this above1135 1124 if (file_exists($amp_conf["AMPBIN"]."/freepbx_setting")) { 1136 1125 exec("chmod 755 ".$amp_conf["AMPBIN"]."/freepbx_setting"); … … 1146 1135 } 1147 1136 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 1150 1138 // 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"); 1151 1141 exec($amp_conf["AMPBIN"]."/freepbx_setting AMPASTERISKWEBGROUP $runas_gid"); 1152 1142 exec($amp_conf["AMPBIN"]."/freepbx_setting AMPASTERISKWEBUSER $runas_uid");
