#!/bin/sh # # dns Start/Stop the internal and external name daemons # # description: dns is a script for starting/stopping/etc DNS servers # version 1.02 # # chkconfig: 345 14 58 # processname: named # Source function library. . /etc/rc.d/init.d/functions # See how we were called. case "$1" in start) echo -n "Starting DNS services: " # # uncomment the following line if you're using holelogd for logging. #daemon /usr/local/bind/sbin/holelogd.named /usr/local/bind/dev/log daemon chroot /usr/local/bind /sbin/named -b /dbfiles_internal/named.conf -u named -g named daemon chroot /usr/local/bind /sbin/named -b /dbfiles_external/named.conf -u named -g named echo ;; stop) echo -n "Stopping DNS services: " killall named # # uncomment the following line if you're using holelogd for logging. #killproc holelogd.named echo ;; status) status named # # uncomment the following line if you're using holelogd for logging. #status holelogd.named ;; restart) /etc/rc.d/init.d/dns stop /etc/rc.d/init.d/dns start ;; reload-ext) ndc -c /usr/local/bind/dbfiles_external/ndc_external reload ;; reload-int) ndc -c /usr/local/bind/dbfiles_internal/ndc_internal reload ;; reconfig-ext) ndc -c /usr/local/bind/dbfiles_external/ndc_external reconfig ;; reconfig-int) ndc -c /usr/local/bind/dbfiles_internal/ndc_internal reconfig ;; *) echo "Usage: dns {start|stop|status|restart|reload-ext|reload-int|reconfig-ext|reconfig-int}" exit 1 esac exit 0