From 8d9f4051e69f7fa6090f7a6cf726eff2fa0cb4ca Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Sun, 30 Jun 2024 17:37:05 +0200 Subject: [PATCH] PowerDNS instructions. --- Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 71bf7d4..dab30be 100644 --- a/Makefile +++ b/Makefile @@ -77,10 +77,22 @@ print-response-messages-no-comments:; make -s print-response-messages | grep -vE # format: nb-domains login domain1 domain2 domain3 MIGRATION_FILE_TARGET = /tmp/dnsmanagerd-migration SQLDB = /tmp/usrdb +POWERDNS_ZONEDIR = /var/powerdns +BINDDIR = /tmp/DATA-dnsmanagerd/bind9-zones $(MIGRATION_FILE_TARGET):; ./bin/sql-to-migration-format.awk < $(SQLDB) > $(MIGRATION_FILE_TARGET) run-migration-client:; ./bin/dnsmanager-client admin migration-script $(MIGRATION_FILE_TARGET) $(LOGIN) migration-file: $(MIGRATION_FILE_TARGET) -migration: migration-file run-migration-client +copy-old-zones: ; cd $(BINDDIR) && for i in * ; do cp -v /tmp/rndczones/$$i . ; done +/tmp/rndczones: + @echo "you forgot to get a copy of old bind zones here: /tmp/rndczones" + exit 1 +powerdns-create-zonedir: + -mkdir -p $(POWERDNS_ZONEDIR) + cp -v $(BINDDIR)/* $(POWERDNS_ZONEDIR) +powerdns-add-zones: powerdns-create-zonedir + cd $(POWERDNS_ZONEDIR) && for i in *; do pdns_control bind-add-zone $$i $(POWERDNS_ZONEDIR)/$$i; done +migration: build-client migration-file run-migration-client run-client-genzones copy-old-zones + @echo "next as root: make powerdns-add-zones doc: crystal docs src/main.cr src/client.cr lib/authd/src/client.cr