diff options
author | Marcello Coutinho <marcellocoutinho@gmail.com> | 2013-11-06 23:56:16 -0200 |
---|---|---|
committer | Marcello Coutinho <marcellocoutinho@gmail.com> | 2013-11-06 23:56:16 -0200 |
commit | fff95f03b7749dc76468c008d4ecc079d9700b06 (patch) | |
tree | d23495fb1b3fed572257b8a7b85b927f5c1d81e5 /config/bind | |
parent | c123b3690d02f074d150a8cc12dfb61b3476560d (diff) | |
download | pfsense-packages-fff95f03b7749dc76468c008d4ecc079d9700b06.tar.gz pfsense-packages-fff95f03b7749dc76468c008d4ecc079d9700b06.tar.bz2 pfsense-packages-fff95f03b7749dc76468c008d4ecc079d9700b06.zip |
bind - fix bind service starting while disabled on gui
Diffstat (limited to 'config/bind')
-rw-r--r-- | config/bind/bind.inc | 15 |
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(); |