#!/bin/sh
# restart bind again to work with VMware.
#  Jun. 15, 2001 // Tsurutani Naoki
#

if [ -f /var/run/bind/named.pid ]; then
	PID=`head -1 /var/run/bind/named.pid`
else
	PID=NULL
fi

case $1 in
start)
	if [ $PID != NULL ]; then
		kill $PID
		sleep 1
		/usr/local/sbin/named -u bind -c /usr/local/etc/namedb/named.conf
	echo "restart bind"
	else
		/usr/local/sbin/named -u bind -c /usr/local/etc/namedb/named.conf
		echo "bind is not running. start bind"
	fi
	;;

stop)
	if [ $PID != NULL ]; then
		kill $PID
		echo "bind stopped."
	else
		echo "bind is not running."
	fi
	;;

*)
	echo "usage: `basename $0` {start|stop}"
	;;
esac

exit 0

GO PREV.つるたにの自己紹介へ戻る
GO PREV.つるたにのホームページへ戻る
Last Update : 08/02/2007 12:47:12 turutani@scphys.kyoto-u.ac.jp