aboutsummaryrefslogtreecommitdiffstats
path: root/config/bind/bind.inc
diff options
context:
space:
mode:
Diffstat (limited to 'config/bind/bind.inc')
-rw-r--r--config/bind/bind.inc15
1 files changed, 10 insertions, 5 deletions
diff --git a/config/bind/bind.inc b/config/bind/bind.inc
index 3b108c82..a288dcfb 100644
--- a/config/bind/bind.inc
+++ b/config/bind/bind.inc
@@ -429,7 +429,7 @@ EOD;
$hostname = (preg_match("/(MX|NS)/",$zone['row'][$y]['hosttype'])?"@":$zone['row'][$y]['hostname']);
$hosttype = $zone['row'][$y]['hosttype'];
$hostdst = $zone['row'][$y]['hostdst'];
- if (preg_match("/[a-zA-Z]/",$hostdst) && !preg_match("/(TXT|SPF))/",$hosttype))
+ if (preg_match("/[a-zA-Z]/",$hostdst) && !preg_match("/(TXT|SPF)/",$hosttype))
$hostdst .= ".";
$hostvalue = $zone['row'][$y]['hostvalue'];
@@ -578,10 +578,15 @@ EOD;
chown(CHROOT_LOCALBASE."/var/log","bind");
chown(CHROOT_LOCALBASE."/var/run/named","bind");
chgrp(CHROOT_LOCALBASE."/var/log","bind");
- if($bind_enable == "on")
- mwexec("/usr/local/etc/rc.d/named.sh restart");
- else
- mwexec("/usr/local/etc/rc.d/named.sh stop");
+ $bind_sh="/usr/local/etc/rc.d/named.sh";
+ if($bind_enable == "on"){
+ chmod ($bind_sh,0755);
+ mwexec("{$bind_sh} restart");
+ }
+ elseif (is_service_running('named')){
+ mwexec("{$bind_sh} stop");
+ chmod ($bind_sh,0644);
+ }
//sync to backup servers
bind_sync_on_changes();
conf_mount_ro();