dnsmanager/mk/commands.mk

34 lines
1.4 KiB
Makefile
Raw Normal View History

2024-12-02 17:14:54 +01:00
# This makefile provides a few examples of dnsmanager-client.
# For a more thorough documentation, read the manual.
# For requests where authentication is required.
LOGIN ?=
ifeq ($(LOGIN),)
LOGIN_OPT =
else
LOGIN_OPT = -l $(LOGIN)
endif
DOMAIN ?= example.com
zone-file: build-write-zone-file; $(Q)$(LOC)write-zone-file $(DOMAIN)
zone-basic-template-file: build-write-template-zone-file; $(Q)$(LOC)write-template-zone-file $(DOMAIN)
VERBOSITY ?= 4
run-client-verbosity:; $(Q)$(LOC)dnsmanager-client admin maintenance verbosity $(VERBOSITY) $(LOGIN_OPT)
run-client-domain-add:; $(Q)$(LOC)dnsmanager-client user domain add $(DOMAIN) $(LOGIN_OPT)
run-client-domain-del:; $(Q)$(LOC)dnsmanager-client user domain del $(DOMAIN) $(LOGIN_OPT)
run-client-domain-list:; $(Q)$(LOC)dnsmanager-client user domain list $(LOGIN_OPT)
run-client-zone-add:; $(Q)$(LOC)dnsmanager-client user zone add $(DOMAIN).json $(LOGIN_OPT)
run-client-zone-get:; $(Q)$(LOC)dnsmanager-client user zone get $(DOMAIN) $(LOGIN_OPT)
RRID ?= 1
NAME ?=
TTL ?= 3600
TARGET ?=
run-client-rr-add-a:
$(Q)$(LOC)dnsmanager-client user rr add A $(DOMAIN) $(NAME) $(TTL) $(TARGET) $(LOGIN_OPT)
run-client-rr-update-a:
$(Q)$(LOC)dnsmanager-client user rr update A $(DOMAIN) $(RRID) $(NAME) $(TTL) $(TARGET) $(LOGIN_OPT)
run-client-rr-del:; $(Q)$(LOC)dnsmanager-client user rr del $(DOMAIN) $(RRID) $(LOGIN_OPT)
run-client-genzones:; $(Q)$(LOC)dnsmanager-client admin genall $(LOGIN_OPT)