From f28f40f7a62b9a6fe939c05b10366b0d66c9ec1e Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Fri, 27 Feb 2009 12:50:34 -0500 Subject: [PATCH] Fixed amavisd socket path. --- 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