tbrehm
2009-10-30 7dbea06e158c10fc59962ba2b988ca0976d5c000
server/mods-available/dns_module.inc.php
@@ -75,6 +75,10 @@
      $app->modules->registerTableHook('dns_soa',$this->module_name,'process');
      $app->modules->registerTableHook('dns_rr',$this->module_name,'process');
      
      // Register service
      $app->services->registerService('bind','dns_module','restartBind');
   }
   
   /*
@@ -99,6 +103,25 @@
      } // end switch
   } // end function
   
   function restartBind($action = 'restart') {
      global $app;
      $command = '';
      if(is_file('/etc/init.d/bind9')) {
         $command = '/etc/init.d/bind9';
      } else {
         $command = '/etc/init.d/named';
      }
      if($action == 'restart') {
         exec($command.' restart');
      } else {
         exec($command.' reload');
      }
   }
} // end class