From c7dc68c848a9e5e5697ceed4509a10e2c543c241 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Tue, 30 Dec 2014 16:44:52 +0100 Subject: [PATCH] add froxlor-group to customer-group in case fcgid/fpm is used for froxlor Signed-off-by: Michael Kaufmann (d00p) --- install/updates/froxlor/0.9/update_0.9.inc.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/install/updates/froxlor/0.9/update_0.9.inc.php b/install/updates/froxlor/0.9/update_0.9.inc.php index 49587fa8..7e5ff7d1 100644 --- a/install/updates/froxlor/0.9/update_0.9.inc.php +++ b/install/updates/froxlor/0.9/update_0.9.inc.php @@ -2837,5 +2837,18 @@ if (isFroxlorVersion('0.9.33-dev3')) { Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `settinggroup`='panel' AND `varname` = 'webfont';"); lastStepStatus(0); + showUpdateStep("Adding local froxlor group to customer groups"); + if ((int)Settings::Get('system.mod_fcgid_ownvhost') == 1 || (int)Settings::Get('phpfpm.enabled_ownvhost') == 1) { + if ((int)Settings::Get('system.mod_fcgid') == 1) { + $local_user = Settings::Get('system.mod_fcgid_httpuser'); + } else { + $local_user = Settings::Get('phpfpm.vhost_httpuser'); + } + Database::query("UPDATE `".TABLE_FTP_GROUPS."` SET `members` = CONCAT(`members`, ',".$local_user."');"); + lastStepStatus(0); + } else { + lastStepStatus(1, "not needed"); + } + updateToVersion('0.9.33-rc1'); }