#!/bin/sh
# Start/stop/restart the system logging daemons.
#
# Written for Slackware Linux by Patrick J. Volkerding <volkerdi@slackware.com>.

named_start() {
  if [ -x /usr/sbin/named ]; then
    echo -n "Starting named"
    echo -n " /usr/sbin/named"
    /usr/sbin/named
    
  fi
}

named_stop() {
  killall named 2> /dev/null
}

named_restart() {
  killall named
  sleep 1
  /usr/sbin/named
}

case "$1" in
'start')
  named_start
  ;;
'stop')
  named_stop
  ;;
'restart')
  named_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac
