From 6ae3691f20d37802942f5f50dd6541b980a60fee Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Tue, 30 Dec 2014 12:15:18 +0100 Subject: [PATCH] dont show apache-needed stuff for php-fpm when not using apache Signed-off-by: Michael Kaufmann (d00p) --- lib/configfiles/wheezy.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/configfiles/wheezy.inc.php b/lib/configfiles/wheezy.inc.php index c43ac49f..08761cee 100644 --- a/lib/configfiles/wheezy.inc.php +++ b/lib/configfiles/wheezy.inc.php @@ -432,16 +432,16 @@ return array( 'php-fpm' => array( 'label' => 'PHP-FPM', 'commands' => array( - '# add "non-free" after all occurances of "main" in /etc/apt/sources.list', - '# this is needed for libapache2-mod-fastcgi to install', - 'apt-get install apache2-suexec libapache2-mod-fastcgi php5-fpm', + (Settings::Get('system.webserver') == 'apache2') ? '# add "non-free" after all occurances of "main" in /etc/apt/sources.list' : null, + (Settings::Get('system.webserver') == 'apache2') ? '# this is needed for libapache2-mod-fastcgi to install' : null, + 'apt-get install '.((Settings::Get('system.webserver') == 'apache2') ? 'apache2-suexec libapache2-mod-fastcgi ' : '') . 'php5-fpm', 'rm /etc/php5/fpm/pool.d/www.conf', - 'a2enmod suexec fastcgi actions', + (Settings::Get('system.webserver') == 'apache2') ? 'a2enmod suexec fastcgi actions' : null, (Settings::Get('phpfpm.enabled_ownvhost') == '1') ? 'groupadd -f '.Settings::Get('phpfpm.vhost_httpgroup') : null, (Settings::Get('phpfpm.enabled_ownvhost') == '1') ? 'useradd -s /bin/false -g '.Settings::Get('phpfpm.vhost_httpgroup').' '.Settings::Get('phpfpm.vhost_httpuser') : null, (Settings::Get('phpfpm.enabled_ownvhost') == '1') ? 'usermod -aG '.Settings::Get('phpfpm.vhost_httpgroup').' '.Settings::Get('system.httpuser') : null, (Settings::Get('phpfpm.enabled_ownvhost') == '1') ? 'chown -R '.Settings::Get('phpfpm.vhost_httpuser').':'.Settings::Get('phpfpm.vhost_httpgroup').' '.FROXLOR_INSTALL_DIR : null, - (Settings::Get('phpfpm.enabled_ownvhost') == '1') ? 'a2dismod php5' : null + (Settings::Get('system.webserver') == 'apache2' && Settings::Get('phpfpm.enabled_ownvhost') == '1') ? 'a2dismod php5' : null ), 'restart' => array( Settings::Get('system.apachereload_command')