setup-bind-zone

This script is designed to be called from the Cloudmin installer,
but can be used anywhere if you like.
It creates a DNS domain set with the --zone flag,
and whose owner email address is set with --email.
The primary nameserver is set with the optional --master flag,
which defaults to the system's hostname.

The zone is created in the view specified by the --view flag,
or you can have it select a view automatically (if needed) with --auto-view.