From e253202995d188925fa4e9df4f6dea0523511eae Mon Sep 17 00:00:00 2001
From: oilyflutesalad <oilyflutesalad@ispconfig3>
Date: Mon, 18 Jan 2010 05:56:48 -0500
Subject: [PATCH] Fixed: FS#928 - System Load Averages should no longer show as zero on non-english linux distros
---
server/mods-available/dns_module.inc.php | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/server/mods-available/dns_module.inc.php b/server/mods-available/dns_module.inc.php
index 79b0e5b..72ae1df 100644
--- a/server/mods-available/dns_module.inc.php
+++ b/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
--
Gitblit v1.9.1