From 8eb646a8abd3c39d37adb64d3908cd6ee6b1e5a8 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 24 Jun 2011 04:09:53 -0400
Subject: [PATCH] Fixed a firewall configuration problem.

---
 server/mods-available/web_module.inc.php |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/server/mods-available/web_module.inc.php b/server/mods-available/web_module.inc.php
index eeae092..01c8b4d 100644
--- a/server/mods-available/web_module.inc.php
+++ b/server/mods-available/web_module.inc.php
@@ -83,8 +83,8 @@
 		*/
 		
 		$app->modules->registerTableHook('web_domain','web_module','process');
-        $app->modules->registerTableHook('ftp_user','web_module','process');
-        $app->modules->registerTableHook('shell_user','web_module','process');
+		$app->modules->registerTableHook('ftp_user','web_module','process');
+		$app->modules->registerTableHook('shell_user','web_module','process');
 		$app->modules->registerTableHook('webdav_user','web_module','process');
 		
 		// Register service
@@ -127,23 +127,23 @@
 	
 	// This function is used
 	function restartHttpd($action = 'restart') {
-		global $app;
+		global $app,$conf;
 		
-		$command = '';
-		if(is_file('/etc/init.d/httpd')) {
-			$command = '/etc/init.d/httpd';
+		$daemon = '';
+		if(is_file($conf['init_scripts'] . '/' . 'httpd')) {
+			$daemon = 'httpd';
 		} else {
-			$command = '/etc/init.d/apache2';
+			$daemon = 'apache2';
 		}
 		
 		if($action == 'restart') {
-			exec($command.' restart');
+			exec($conf['init_scripts'] . '/' . $daemon . ' restart');
 		} else {
-			exec($command.' reload');
+			exec($conf['init_scripts'] . '/' . $daemon . ' reload');
 		}
 		
 	}
 
 } // end class
 
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1