From 34491bc835f5c1a0358788c2eda99d84cbe4261b Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Wed, 20 Feb 2013 14:25:23 -0500
Subject: [PATCH] - Make sure PHP-FPM pool directory exists also if Apache is used.
---
install/dist/lib/opensuse.lib.php | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index cbbf5bb..67ebe7c 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -607,6 +607,24 @@
$command = 'groupadd sshusers';
if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
+ // create PHP-FPM pool dir
+ exec('mkdir -p '.$conf['nginx']['php_fpm_pool_dir']);
+
+ $content = rf('/etc/php5/fpm/php-fpm.conf');
+ if(stripos($content, 'include=/etc/php5/fpm/pool.d/*.conf') === false){
+ af('/etc/php5/fpm/php-fpm.conf',"\ninclude=/etc/php5/fpm/pool.d/*.conf");
+ }
+ unset($content);
+ if(!@is_file($conf['nginx']['php_fpm_ini_path'])){
+ if(@is_file('/etc/php5/cli/php.ini')){
+ exec('cp -f /etc/php5/cli/php.ini '.$conf['nginx']['php_fpm_ini_path']);
+ } elseif(@is_file('/etc/php5/fastcgi/php.ini')){
+ exec('cp -f /etc/php5/fastcgi/php.ini '.$conf['nginx']['php_fpm_ini_path']);
+ } elseif(@is_file('/etc/php5/apache2/php.ini')){
+ exec('cp -f /etc/php5/apache2/php.ini '.$conf['nginx']['php_fpm_ini_path']);
+ }
+ }
+
}
public function configure_nginx(){
--
Gitblit v1.9.1