#!/bin/sh set -e setup() ( service bind9 stop service bind9 start sleep 1 ) run() ( # Make a query against a local zone dig -x 127.0.0.1 @127.0.0.1 ) teardown() ( service bind9 stop ) setup run teardown