X-Git-Url: https://git.ralfj.de/zonemaker.git/blobdiff_plain/a40b6b5bb7e6cf04a7dbbc7806cb57da310c9d41..a683afa38cc20da20ad379ac9af280eae01433a2:/Makefile.sample diff --git a/Makefile.sample b/Makefile.sample index c2d05c7..a78edf3 100644 --- a/Makefile.sample +++ b/Makefile.sample @@ -1,4 +1,18 @@ -db.example.com: db.example.com.py - @sudo -u user ~user/zonemaker/zone-maker $< > $@ || rm -f $@ +# edit list of zones and other configuration here +zones := example.com +user := user +zonemaker := ~user/zonemaker/zonemaker + +# heres comes the magic +zonefiles = $(addprefix db.,${zones}) +all: ${zonefiles} +.PHONY: all + +db.%: db.%.py + @echo $* $< $@ + @sudo -u ${user} ${zonemaker} $< > $@ || rm -f $@ @cat $@ - @rndc reload example.com + @echo + @rndc reload $* # this only returns errors if the zone had not previously been loaded :-/ + @sleep 1 + @fgrep 'zone '$*'/IN' /var/log/syslog | tail -n 5