From 0110094b2d206e88dceb0cfe2bc4c85f2e826dda Mon Sep 17 00:00:00 2001 From: moglia <moglia@ispconfig3> Date: Thu, 13 May 2010 00:39:42 -0400 Subject: [PATCH] Small brazilian portuguese language files update. br_database_list.lng --- server/mods-available/web_module.inc.php | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-) diff --git a/server/mods-available/web_module.inc.php b/server/mods-available/web_module.inc.php index 7ebed3a..1e7bde7 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 */ @@ -67,7 +80,8 @@ */ $app->modules->registerTableHook('web_domain','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'); // Register service $app->services->registerService('httpd','web_module','restartHttpd'); @@ -105,10 +119,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