From 799d11f341a6e1b6fa716ba27190d789c19ba245 Mon Sep 17 00:00:00 2001
From: redray <redray@ispconfig3>
Date: Sun, 08 Mar 2009 15:10:21 -0400
Subject: [PATCH] template display fixes for sites
---
server/mods-available/web_module.inc.php | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/server/mods-available/web_module.inc.php b/server/mods-available/web_module.inc.php
index 7ebed3a..9a3f85e 100644
--- a/server/mods-available/web_module.inc.php
+++ b/server/mods-available/web_module.inc.php
@@ -42,6 +42,19 @@
'shell_user_update',
'shell_user_delete');
+ //* This function is called during ispconfig installation to determine
+ // if a symlink shall be created for this plugin.
+ function onInstall() {
+ global $conf;
+
+ if($conf['services']['web'] == true) {
+ return true;
+ } else {
+ return false;
+ }
+
+ }
+
/*
This function is called when the module is loaded
*/
@@ -105,10 +118,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