"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "server/mods-available/web_module.inc.php" between
ISPConfig-3.2.6.tar.gz and ISPConfig-3.2.7.tar.gz

About: ISPConfig is an ISP management and Hosting Control Panel (for different Managed Services).

web_module.inc.php  (ISPConfig-3.2.6):web_module.inc.php  (ISPConfig-3.2.7)
skipping to change at line 245 skipping to change at line 245
$app->log("Checking nginx configuration...", LOGLEVEL_DEB UG); $app->log("Checking nginx configuration...", LOGLEVEL_DEB UG);
exec('nginx -t 2>&1', $retval['output'], $retval['retval' ]); exec('nginx -t 2>&1', $retval['output'], $retval['retval' ]);
if($retval['retval'] == 0){ if($retval['retval'] == 0){
$app->log("nginx configuration ok!", LOGLEVEL_DEB UG); $app->log("nginx configuration ok!", LOGLEVEL_DEB UG);
} else { } else {
$app->log("nginx config test failed!", LOGLEVEL_D EBUG); $app->log("nginx config test failed!", LOGLEVEL_D EBUG);
return $retval; return $retval;
} }
} }
exec($cmd.' 2>&1', $retval['output'], $retval['retval']); $app->log("Restarting httpd: $cmd", LOGLEVEL_DEBUG);
if($cmd != '') {
exec($cmd.' 2>&1', $retval['output'], $retval['retval']);
} else {
$app->log('We got no init command, restart or reload of s
ervice aborted.',LOGLEVEL_WARN);
}
// if restart failed despite successful syntax check => try again // if restart failed despite successful syntax check => try again
if($web_config['server_type'] == 'nginx' && $retval['retval'] > 0 ){ if($web_config['server_type'] == 'nginx' && $retval['retval'] > 0 ){
sleep(2); sleep(2);
exec($cmd.' 2>&1', $retval['output'], $retval['retval']); exec($cmd.' 2>&1', $retval['output'], $retval['retval']);
} }
$app->log("Restarting httpd: $cmd", LOGLEVEL_DEBUG);
// nginx: do a syntax check because on some distributions, the in it script always returns 0 - even if the syntax is not ok (how stupid is that?) // nginx: do a syntax check because on some distributions, the in it script always returns 0 - even if the syntax is not ok (how stupid is that?)
//if($web_config['server_type'] == 'nginx' && $retval['retval'] = = 0){ //if($web_config['server_type'] == 'nginx' && $retval['retval'] = = 0){
//exec('nginx -t 2>&1', $retval['output'], $retval['retva l']); //exec('nginx -t 2>&1', $retval['output'], $retval['retva l']);
//} //}
return $retval; return $retval;
} }
function restartPHP_FPM($action = 'restart') { function restartPHP_FPM($action = 'restart') {
global $app, $conf; global $app, $conf;
skipping to change at line 310 skipping to change at line 315
// And the next workaround, php-fpm reloa ds in centos 7 downt work as well. // And the next workaround, php-fpm reloa ds in centos 7 downt work as well.
if(preg_match('/^ID="centos"/m', $tmp) && preg_match('/^VERSION_ID="7"/m', $tmp)) { if(preg_match('/^ID="centos"/m', $tmp) && preg_match('/^VERSION_ID="7"/m', $tmp)) {
$initcommand = 'systemctl restart php-fpm.service'; $initcommand = 'systemctl restart php-fpm.service';
} }
unset($tmp); unset($tmp);
} }
} }
*/ */
} }
$retval = array('output' => '', 'retval' => 0);
exec($initcommand.' 2>&1', $retval['output'], $retval['retval']);
$app->log("Restarting php-fpm: $initcommand", LOGLEVEL_DEBUG); $app->log("Restarting php-fpm: $initcommand", LOGLEVEL_DEBUG);
if($initcommand != '') {
$retval = array('output' => '', 'retval' => 0);
exec($initcommand.' 2>&1', $retval['output'], $retval['re
tval']);
} else {
$app->log('We got no init command, restart or reload of p
hp-fpm service aborted.',LOGLEVEL_WARN);
}
return $retval; return $retval;
} }
} // end class } // end class
?> ?>
 End of changes. 4 change blocks. 
4 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)