Renaming dnsmanager-client in dnsmanagerctl.

This commit is contained in:
Philippe Pittoli 2024-12-11 11:24:18 +01:00
parent 217211ea27
commit 754b641adc
9 changed files with 36 additions and 36 deletions

View File

@ -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 <rule> LOC="
LOC ?= ./bin/

View File

@ -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
.

View File

@ -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
.

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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 <TAB> domain1 <TAB> domain2 <TAB> domain3 (etc.)
def admin_migration_script