From 754b641adcc9d5c1d4048b62d032bae0bf835553 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Wed, 11 Dec 2024 11:24:18 +0100 Subject: [PATCH] Renaming dnsmanager-client in dnsmanagerctl. --- makefile | 2 +- man/{dnsmanager-client.1 => dnsmanagerctl.1} | 16 +++++++------- man/dnsmanagerd.1 | 4 ++-- mk/build.mk | 6 +++--- mk/commands.mk | 22 ++++++++++---------- mk/install.mk | 14 ++++++------- mk/migration.mk | 4 ++-- shard.yml | 2 +- src/client/main.cr | 2 +- 9 files changed, 36 insertions(+), 36 deletions(-) rename man/{dnsmanager-client.1 => dnsmanagerctl.1} (96%) diff --git a/makefile b/makefile index a40acec..4f6943a 100644 --- a/makefile +++ b/makefile @@ -3,7 +3,7 @@ all: build-server Q ?= @ # By default, the following makefile rules will use the compiled version -# of the applications (such as dnsmanagerd and dnsmanager-client), +# of the applications (such as dnsmanagerd and dnsmanagerctl), # not the ones from the system (in /usr/local/bin/ for example). # To avoid that, use: "make LOC=" LOC ?= ./bin/ diff --git a/man/dnsmanager-client.1 b/man/dnsmanagerctl.1 similarity index 96% rename from man/dnsmanager-client.1 rename to man/dnsmanagerctl.1 index 4849dc3..e5fc2ee 100644 --- a/man/dnsmanager-client.1 +++ b/man/dnsmanagerctl.1 @@ -1,22 +1,22 @@ .Dd 24 november 2024 -.Dt "dnsmanager-client" 1 +.Dt "dnsmanagerctl" 1 .Os Linux "(Ubuntu and Alpine)" .Sh Name -.Nm dnsmanager-client +.Nm dnsmanagerctl .Nd a client for the .Xr dnsmanagerd 1 service. .Sh Description -.Nm dnsmanager-client +.Nm dnsmanagerctl is a client for the .Xr dnsmanagerd 1 service, a micro-service providing DNS domains and zones management. .Sh Synopsis . -.Nm dnsmanager-client +.Nm dnsmanagerctl .Op Fl h .Ar COMMAND No .Op Ar help @@ -141,7 +141,7 @@ flag to learn about the next parameters to give. .Sh Configuration Configuration for -.Xr dnsmanager-client +.Xr dnsmanagerctl is split into two files: the one related to the authentication dans the one related to dnsmanagerd. Some parameters will reasonably come from a configuration file instead of the command-line interface, at least for .Dq login @@ -155,7 +155,7 @@ or exactly as the .Xr authd 1 daemon and its -.Xr authc 1 +.Xr authctl 1 client. Configuration file is in YAML, see the following example: @@ -171,7 +171,7 @@ password: banana In this example, the login and password of the user are set. The -.Xr authc +.Xr authctl application won't require them as command-line parameters for performing authenticated actions. .Sh Configuration file variables @@ -227,7 +227,7 @@ the documentation of the way libipc works .Xr authd 1 the authentication and authorization daemon related to this client. . -.It Xr authc 1 +.It Xr authctl 1 a command-line-interface client for .Xr authd . diff --git a/man/dnsmanagerd.1 b/man/dnsmanagerd.1 index 6565399..20d42a5 100644 --- a/man/dnsmanagerd.1 +++ b/man/dnsmanagerd.1 @@ -238,7 +238,7 @@ TODO: expand the documentation .It Xr libipc 7 the documentation of the way libipc works . -.It Xr dnsmanager-client 1 +.It Xr dnsmanagerctl 1 a command-line-interface client for .Xr dnsmanagerd . @@ -247,7 +247,7 @@ an authentication and authorization micro-service used by .Xr dnsmanagerd to handle users (authentication, authorization, preferences and profile) . -.It Xr authc 1 +.It Xr authctl 1 a command-line-interface client for .Xr authd . diff --git a/mk/build.mk b/mk/build.mk index 5f20c60..e40ca17 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -17,9 +17,9 @@ bin/dnsmanagerd: $(SOURCE_FILES) $(Q)shards build dnsmanagerd $(CRFLAGS) build-server: bin/dnsmanagerd -bin/dnsmanager-client: $(SOURCE_FILES) - $(Q)shards build dnsmanager-client $(CRFLAGS) -build-client: bin/dnsmanager-client +bin/dnsmanagerctl: $(SOURCE_FILES) + $(Q)shards build dnsmanagerctl $(CRFLAGS) +build-client: bin/dnsmanagerctl bin/token-handler: tools/token-handler.cr $(Q)shards build token-handler $(CRFLAGS) diff --git a/mk/commands.mk b/mk/commands.mk index dda362e..6d2eac5 100644 --- a/mk/commands.mk +++ b/mk/commands.mk @@ -1,4 +1,4 @@ -# This makefile provides a few examples of dnsmanager-client. +# This makefile provides a few examples of dnsmanagerctl. # For a more thorough documentation, read the manual. # For requests where authentication is required. @@ -14,20 +14,20 @@ 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) +run-client-verbosity:; $(Q)$(LOC)dnsmanagerctl admin maintenance verbosity $(VERBOSITY) $(LOGIN_OPT) +run-client-domain-add:; $(Q)$(LOC)dnsmanagerctl user domain add $(DOMAIN) $(LOGIN_OPT) +run-client-domain-del:; $(Q)$(LOC)dnsmanagerctl user domain del $(DOMAIN) $(LOGIN_OPT) +run-client-domain-list:; $(Q)$(LOC)dnsmanagerctl user domain list $(LOGIN_OPT) +run-client-zone-add:; $(Q)$(LOC)dnsmanagerctl user zone add $(DOMAIN).json $(LOGIN_OPT) +run-client-zone-get:; $(Q)$(LOC)dnsmanagerctl 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) + $(Q)$(LOC)dnsmanagerctl 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) + $(Q)$(LOC)dnsmanagerctl user rr update A $(DOMAIN) $(RRID) $(NAME) $(TTL) $(TARGET) $(LOGIN_OPT) +run-client-rr-del:; $(Q)$(LOC)dnsmanagerctl user rr del $(DOMAIN) $(RRID) $(LOGIN_OPT) +run-client-genzones:; $(Q)$(LOC)dnsmanagerctl admin genall $(LOGIN_OPT) diff --git a/mk/install.mk b/mk/install.mk index 81fdcb9..4017bd9 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -7,18 +7,18 @@ MANDIR ?= $(SHAREDIR)/man install-dnsmanagerd: build-server $(Q)install -D -m 555 ./bin/dnsmanagerd $(DESTDIR)$(BINDIR)/dnsmanagerd -install-dnsmanager-client: build-client - $(Q)install -D -m 555 ./bin/dnsmanager-client $(DESTDIR)$(BINDIR)/dnsmanager-client -install-binaries: install-dnsmanagerd install-dnsmanager-client +install-dnsmanagerctl: build-client + $(Q)install -D -m 555 ./bin/dnsmanagerctl $(DESTDIR)$(BINDIR)/dnsmanagerctl +install-binaries: install-dnsmanagerd install-dnsmanagerctl -gz-man-dnsmanager-client:; $(Q)gzip -k -f --best ./man/dnsmanager-client.1 +gz-man-dnsmanagerctl:; $(Q)gzip -k -f --best ./man/dnsmanagerctl.1 gz-man-dnsmanagerd:; $(Q)gzip -k -f --best ./man/dnsmanagerd.1 install-man-dnsmanagerd: gz-man-dnsmanagerd $(Q)install -D -m 444 ./man/dnsmanagerd.1.gz $(DESTDIR)$(MANDIR)/man1/dnsmanagerd.1.gz -install-man-dnsmanager-client: gz-man-dnsmanager-client - $(Q)install -D -m 444 ./man/dnsmanager-client.1.gz $(DESTDIR)$(MANDIR)/man1/dnsmanager-client.1.gz -install-man: install-man-dnsmanagerd install-man-dnsmanager-client +install-man-dnsmanagerctl: gz-man-dnsmanagerctl + $(Q)install -D -m 444 ./man/dnsmanagerctl.1.gz $(DESTDIR)$(MANDIR)/man1/dnsmanagerctl.1.gz +install-man: install-man-dnsmanagerd install-man-dnsmanagerctl install-dev-doc: doc ; install -D docs/ $(DESTDIR)$(DOCDIR) diff --git a/mk/migration.mk b/mk/migration.mk index 0f6ab4a..1efad51 100644 --- a/mk/migration.mk +++ b/mk/migration.mk @@ -8,7 +8,7 @@ # # HOW MIGRATION WORKS, STEP BY STEP (`migration` rule): # -# 1. build-client -> build bin/dnsmanager-client +# 1. build-client -> build bin/dnsmanagerctl # 2. migration-file -> generate $(MIGRATION_FILE_TARGET) # 3. run-migration-client -> create users and attribute domains # 4. run-client-genzones -> generate Bind9 zone files with dnsmanagerd @@ -39,7 +39,7 @@ $(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) + ./bin/dnsmanagerctl admin migration-script $(MIGRATION_FILE_TARGET) $(LOGIN) copy-old-zones: cd $(BINDDIR) && for i in * ; do cp -v $(OLDBINDDIR)/$$i . ; done diff --git a/shard.yml b/shard.yml index 49ee27b..bfa3734 100644 --- a/shard.yml +++ b/shard.yml @@ -25,7 +25,7 @@ dependencies: targets: dnsmanagerd: main: src/main.cr - dnsmanager-client: + dnsmanagerctl: main: src/client/main.cr write-zone-file: main: tools/write-zone-file.cr diff --git a/src/client/main.cr b/src/client/main.cr index 65a64fa..f63d6ae 100644 --- a/src/client/main.cr +++ b/src/client/main.cr @@ -90,7 +90,7 @@ class Actions # Migration script. # - # Usage: dnsmanager-client admin migration-script user-db.txt + # Usage: dnsmanagerctl admin migration-script user-db.txt # # user-db.txt should be formated as: login domain1 domain2 domain3 (etc.) def admin_migration_script