#!/bin/sh # # zones.conf-generator — generate zones.conf through interpolation # # Copyright © 2014 martin f. krafft # Released under the terms of the Artistic Licence 2.0 # set -eu for zonefile in zones/*.zone arpazones/*.arpa; do zone=${zonefile%.zone}; zone=${zone##*/}; printf 'zone:\n\tname: "%s"\n\tzonefile: "%s"\n' $zone $zonefile; done cat <<_eof ## checksums: _eof find arpazones zones -type f -exec sha256sum {} + | sed -e 's,^,#,'