tbrehm
2008-12-12 ec09b18c9c44f85ceb6d9e7588a03a221cd1193f
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');
      }
      
   }