diff options
Diffstat (limited to 'extra/bind/named')
-rwxr-xr-x | extra/bind/named | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/extra/bind/named b/extra/bind/named index 3be558f27..7907f9983 100755 --- a/extra/bind/named +++ b/extra/bind/named @@ -1,12 +1,16 @@ #!/bin/bash -NAMED_ARGS= -[ -f /etc/conf.d/named ] && . /etc/conf.d/named - . /etc/rc.conf . /etc/rc.d/functions +. /etc/conf.d/named + +[[ -d /var/run/named ]] || mkdir -p /var/run/named +chown named:named /var/run/named + +PIDFILE=/var/run/named/named.pid +PID=$(cat $PIDFILE 2>/dev/null) +readlink -q /proc/$PID/exe | grep -q '^/usr/sbin/named' || { PID=; rm $PIDFILE 2>/dev/null; } -PID=`pidof -o %PPID /usr/sbin/named` case "$1" in start) stat_busy "Starting BIND" |