From 4a4d48104ba8fe3483aa3ac45d6fe35a7c00ece1 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sat, 13 Sep 2008 07:26:01 -0400
Subject: [PATCH] Removed some fields of the advanced options tab of the website.

---
 server/mods-available/web_module.inc.php |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/server/mods-available/web_module.inc.php b/server/mods-available/web_module.inc.php
index 7ebed3a..d7617c6 100644
--- a/server/mods-available/web_module.inc.php
+++ b/server/mods-available/web_module.inc.php
@@ -105,10 +105,18 @@
 	// This function is used
 	function restartHttpd($action = 'restart') {
 		global $app;
-		if($action == 'restart') {
-			exec('/etc/init.d/apache2 restart');
+		
+		$command = '';
+		if(is_file('/etc/init.d/httpd')) {
+			$command = '/etc/init.d/httpd';
 		} else {
-			exec('/etc/init.d/apache2 reload');
+			$command = '/etc/init.d/apache2';
+		}
+		
+		if($action == 'restart') {
+			exec($command.' restart');
+		} else {
+			exec($command.' reload');
 		}
 		
 	}

--
Gitblit v1.9.1