From 99b55bfba53aa6de380c84a036b286c951533dcb Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Wed, 28 Sep 2011 06:28:29 -0400
Subject: [PATCH] - nginx: If apps vhost is reconfigured, apps pool (PHP-FPM) is reconfigured as well. - Installer adds Apache and nginx user to ispapps group. - Installer makes sure that /var/www/apps has 755 permissions.

---
 install/lib/installer_base.lib.php |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index ab1f110..c35b601 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -1396,7 +1396,11 @@
 			$command = 'adduser '.$conf['apache']['user'].' '.$apps_vhost_group;
 			caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 
-			if(!@is_dir($install_dir)) mkdir($install_dir, 0755, true);
+			if(!@is_dir($install_dir)){
+				mkdir($install_dir, 0755, true);
+			} else {
+				chmod($install_dir, 0755);
+			}
 			chown($install_dir, $apps_vhost_user);
 			chgrp($install_dir, $apps_vhost_group);
 
@@ -1744,10 +1748,14 @@
 		if($conf['apache']['installed'] == true){
 			$command = 'adduser '.$conf['apache']['user'].' ispconfig';
 			caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
+			$command = 'adduser '.$conf['apache']['user'].' ispapps';
+			caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 		}
 		if($conf['nginx']['installed'] == true){
 			$command = 'adduser '.$conf['nginx']['user'].' ispconfig';
 			caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
+			$command = 'adduser '.$conf['nginx']['user'].' ispapps';
+			caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 		}
 
 		//* Make the shell scripts executable

--
Gitblit v1.9.1