make fpm socket directory a setting, fixes #1300
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -2423,3 +2423,26 @@ if (isFroxlorVersion('0.9.30')) {
|
||||
|
||||
updateToVersion('0.9.31-dev1');
|
||||
}
|
||||
|
||||
if (isFroxlorVersion('0.9.31-dev1')) {
|
||||
|
||||
showUpdateStep("Updating from 0.9.31-dev1 to 0.9.31-dev2", true);
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Adding new phpfpm-ipcdir setting");
|
||||
$ins_stmt = Database::prepare("
|
||||
INSERT INTO `".TABLE_PANEL_SETTINGS."` SET `settinggroup` = 'phpfpm', `varname` = 'fastcgi_ipcdir', `value` = :value
|
||||
");
|
||||
$params = array();
|
||||
if ($settings['system']['webserver'] == 'apache2') {
|
||||
$params['value'] = '/var/lib/apache2/fastcgi/';
|
||||
} elseif ($settings['system']['webserver'] == 'lighttpd') {
|
||||
$params['value'] = '/var/run/lighttpd/';
|
||||
} elseif ($settings['system']['webserver'] == 'nginx') {
|
||||
$params['value'] = '/var/run/nginx/';
|
||||
}
|
||||
Database::pexecute($ins_stmt, $params);
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.31-dev2');
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
$has_preconfig = true;
|
||||
$description = 'The PHP-FPM implementation for apache2 has changed. Please look for the "<b>fastcgi.conf</b>" (Debian/Ubuntu) or "<b>70_fastcgi.conf</b>" (Gentoo) within /etc/apache2/ and change it as shown below:<br /><br />';
|
||||
$description .= '<pre style="width:500px;border:1px solid #ccc;padding:4px;"><IfModule mod_fastcgi.c>
|
||||
FastCgiIpcDir /var/run/apache2/
|
||||
FastCgiIpcDir /var/lib/apache2/fastcgi/
|
||||
<Location "/fastcgiphp">
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
@@ -573,4 +573,15 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
if (versionInUpdate($current_version, '0.9.31-dev2')) {
|
||||
if ($settings['system']['webserver'] == 'apache2'
|
||||
&& $settings['phpfpm']['enabled'] == '1'
|
||||
) {
|
||||
$has_preconfig = true;
|
||||
$description = 'The FPM socket directory is now a setting in froxlor. Its default is <b>/var/lib/apache2/fastcgi/</b>.<br/>If you are using <b>/var/run/apache2</b> in the "<b>fastcgi.conf</b>" (Debian/Ubuntu) or "<b>70_fastcgi.conf</b>" (Gentoo) please correct this path accordingly<br />';
|
||||
$question = '';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user