#!/bin/sh

case "$2" in
  up)
    echo "(named dispatcher script) starting named..."
    if /usr/sbin/named -u named; then
      echo "(named dispatcher script) ...success!"
    else
      echo "(named dispatcher script) ...failure!"
   fi;;
  down)
    echo "(named dispatcher script) killing named..."
    if pkill -x named; then
      echo "(named dispatcher script) ...success!"
    else
      echo "(named dispatcher script) ...failure!"
    fi;;
esac

echo "(named dispatcher script) reached end of script, exiting."
exit 0
