added new config option for php fpm fixes #1089
This commit is contained in:
@@ -1642,7 +1642,7 @@ if(isFroxlorVersion('0.9.22-svn1'))
|
||||
|
||||
/* fix backup_dir for #186 */
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/var/customers/backups/' WHERE `varname` = 'backup_dir';");
|
||||
|
||||
|
||||
updateToVersion('0.9.22-svn2');
|
||||
}
|
||||
|
||||
@@ -1650,7 +1650,7 @@ if(isFroxlorVersion('0.9.22-svn2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.22-svn2 to 0.9.22-rc1");
|
||||
lastStepStatus(0);
|
||||
|
||||
|
||||
updateToVersion('0.9.22-rc1');
|
||||
}
|
||||
|
||||
@@ -1658,7 +1658,7 @@ if(isFroxlorVersion('0.9.22-rc1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.22-rc1 to 0.9.22");
|
||||
lastStepStatus(0);
|
||||
|
||||
|
||||
updateToVersion('0.9.22');
|
||||
}
|
||||
|
||||
@@ -1729,10 +1729,10 @@ if(isFroxlorVersion('0.9.25'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.25 to 0.9.26-svn1");
|
||||
lastStepStatus(0);
|
||||
|
||||
|
||||
// enable bind by default
|
||||
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'bind_enable', '1')");
|
||||
|
||||
|
||||
updateToVersion('0.9.26-svn1');
|
||||
}
|
||||
|
||||
@@ -1756,24 +1756,24 @@ if(isFroxlorVersion('0.9.26'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.26 to 0.9.27-svn1");
|
||||
lastStepStatus(0);
|
||||
|
||||
|
||||
// check for multiple backup_ftp_enabled entries
|
||||
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `varname` = 'backup_ftp_enabled';");
|
||||
|
||||
|
||||
// if there are more than one entry try to fix it
|
||||
if ($db->num_rows($handle) > 1) {
|
||||
$rows = $db->fetch_array($handle);
|
||||
$state = false;
|
||||
|
||||
|
||||
// iterate through all found entries
|
||||
// and try to guess what value it should be
|
||||
foreach ($rows as $row) {
|
||||
$state = $state | $row['value'];
|
||||
}
|
||||
|
||||
|
||||
// now delete all entries
|
||||
$db->query("DELETE FROM `panel_settings` WHERE `varname` = 'backup_ftp_enabled';");
|
||||
|
||||
|
||||
// and re-add it
|
||||
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'backup_ftp_enabled', '". $state ."');");
|
||||
}
|
||||
@@ -1785,18 +1785,18 @@ if(isFroxlorVersion('0.9.27-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.27-svn1 to 0.9.27-svn2");
|
||||
lastStepStatus(0);
|
||||
|
||||
|
||||
// Get FastCGI timeout setting if available
|
||||
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `settinggroup` = 'system' AND `varname` = 'mod_fcgid_idle_timeout';");
|
||||
|
||||
|
||||
// If timeout is set then skip
|
||||
if ($db->num_rows($handle) < 1) {
|
||||
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_idle_timeout', '30');");
|
||||
}
|
||||
|
||||
|
||||
// Get FastCGI timeout setting if available
|
||||
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `settinggroup` = 'phpfpm' AND `varname` = 'idle_timeout';");
|
||||
|
||||
|
||||
// If timeout is set then skip
|
||||
if ($db->num_rows($handle) < 1) {
|
||||
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('phpfpm', 'idle_timeout', '30');");
|
||||
@@ -1821,3 +1821,17 @@ if(isFroxlorVersion('0.9.27-rc1'))
|
||||
updateToVersion('0.9.27');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.27')) {
|
||||
showUpdateStep("Updating from 0.9.27 to 0.9.28-fpmfix");
|
||||
lastStepStatus(0);
|
||||
|
||||
// Get AliasconfigDir setting if available
|
||||
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `settinggroup` = 'phpfpm' AND `varname` = 'aliasconfigdir';");
|
||||
|
||||
// If AliasconfigDir is set then skip
|
||||
if ($db->num_rows($handle) < 1) {
|
||||
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('phpfpm', 'aliasconfigdir', '/var/www/php-fpm/');");
|
||||
}
|
||||
|
||||
updateToVersion('0.9.28-fpmfix');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user