Renaming dnsmanager-client in dnsmanagerctl.
This commit is contained in:
parent
217211ea27
commit
754b641adc
2
makefile
2
makefile
@ -3,7 +3,7 @@ all: build-server
|
|||||||
Q ?= @
|
Q ?= @
|
||||||
|
|
||||||
# By default, the following makefile rules will use the compiled version
|
# 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).
|
# not the ones from the system (in /usr/local/bin/ for example).
|
||||||
# To avoid that, use: "make <rule> LOC="
|
# To avoid that, use: "make <rule> LOC="
|
||||||
LOC ?= ./bin/
|
LOC ?= ./bin/
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
.Dd 24 november 2024
|
.Dd 24 november 2024
|
||||||
.Dt "dnsmanager-client" 1
|
.Dt "dnsmanagerctl" 1
|
||||||
.Os Linux "(Ubuntu and Alpine)"
|
.Os Linux "(Ubuntu and Alpine)"
|
||||||
|
|
||||||
.Sh Name
|
.Sh Name
|
||||||
.Nm dnsmanager-client
|
.Nm dnsmanagerctl
|
||||||
.Nd a client for the
|
.Nd a client for the
|
||||||
.Xr dnsmanagerd 1
|
.Xr dnsmanagerd 1
|
||||||
service.
|
service.
|
||||||
|
|
||||||
.Sh Description
|
.Sh Description
|
||||||
.Nm dnsmanager-client
|
.Nm dnsmanagerctl
|
||||||
is a client for the
|
is a client for the
|
||||||
.Xr dnsmanagerd 1
|
.Xr dnsmanagerd 1
|
||||||
service, a micro-service providing DNS domains and zones management.
|
service, a micro-service providing DNS domains and zones management.
|
||||||
|
|
||||||
.Sh Synopsis
|
.Sh Synopsis
|
||||||
.
|
.
|
||||||
.Nm dnsmanager-client
|
.Nm dnsmanagerctl
|
||||||
.Op Fl h
|
.Op Fl h
|
||||||
.Ar COMMAND No
|
.Ar COMMAND No
|
||||||
.Op Ar help
|
.Op Ar help
|
||||||
@ -141,7 +141,7 @@ flag to learn about the next parameters to give.
|
|||||||
|
|
||||||
.Sh Configuration
|
.Sh Configuration
|
||||||
Configuration for
|
Configuration for
|
||||||
.Xr dnsmanager-client
|
.Xr dnsmanagerctl
|
||||||
is split into two files: the one related to the authentication dans the one related to dnsmanagerd.
|
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
|
Some parameters will reasonably come from a configuration file instead of the command-line interface, at least for
|
||||||
.Dq login
|
.Dq login
|
||||||
@ -155,7 +155,7 @@ or
|
|||||||
exactly as the
|
exactly as the
|
||||||
.Xr authd 1
|
.Xr authd 1
|
||||||
daemon and its
|
daemon and its
|
||||||
.Xr authc 1
|
.Xr authctl 1
|
||||||
client.
|
client.
|
||||||
|
|
||||||
Configuration file is in YAML, see the following example:
|
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.
|
In this example, the login and password of the user are set.
|
||||||
The
|
The
|
||||||
.Xr authc
|
.Xr authctl
|
||||||
application won't require them as command-line parameters for performing authenticated actions.
|
application won't require them as command-line parameters for performing authenticated actions.
|
||||||
|
|
||||||
.Sh Configuration file variables
|
.Sh Configuration file variables
|
||||||
@ -227,7 +227,7 @@ the documentation of the way libipc works
|
|||||||
.Xr authd 1
|
.Xr authd 1
|
||||||
the authentication and authorization daemon related to this client.
|
the authentication and authorization daemon related to this client.
|
||||||
.
|
.
|
||||||
.It Xr authc 1
|
.It Xr authctl 1
|
||||||
a command-line-interface client for
|
a command-line-interface client for
|
||||||
.Xr authd
|
.Xr authd
|
||||||
.
|
.
|
@ -238,7 +238,7 @@ TODO: expand the documentation
|
|||||||
.It Xr libipc 7
|
.It Xr libipc 7
|
||||||
the documentation of the way libipc works
|
the documentation of the way libipc works
|
||||||
.
|
.
|
||||||
.It Xr dnsmanager-client 1
|
.It Xr dnsmanagerctl 1
|
||||||
a command-line-interface client for
|
a command-line-interface client for
|
||||||
.Xr dnsmanagerd
|
.Xr dnsmanagerd
|
||||||
.
|
.
|
||||||
@ -247,7 +247,7 @@ an authentication and authorization micro-service used by
|
|||||||
.Xr dnsmanagerd
|
.Xr dnsmanagerd
|
||||||
to handle users (authentication, authorization, preferences and profile)
|
to handle users (authentication, authorization, preferences and profile)
|
||||||
.
|
.
|
||||||
.It Xr authc 1
|
.It Xr authctl 1
|
||||||
a command-line-interface client for
|
a command-line-interface client for
|
||||||
.Xr authd
|
.Xr authd
|
||||||
.
|
.
|
||||||
|
@ -17,9 +17,9 @@ bin/dnsmanagerd: $(SOURCE_FILES)
|
|||||||
$(Q)shards build dnsmanagerd $(CRFLAGS)
|
$(Q)shards build dnsmanagerd $(CRFLAGS)
|
||||||
build-server: bin/dnsmanagerd
|
build-server: bin/dnsmanagerd
|
||||||
|
|
||||||
bin/dnsmanager-client: $(SOURCE_FILES)
|
bin/dnsmanagerctl: $(SOURCE_FILES)
|
||||||
$(Q)shards build dnsmanager-client $(CRFLAGS)
|
$(Q)shards build dnsmanagerctl $(CRFLAGS)
|
||||||
build-client: bin/dnsmanager-client
|
build-client: bin/dnsmanagerctl
|
||||||
|
|
||||||
bin/token-handler: tools/token-handler.cr
|
bin/token-handler: tools/token-handler.cr
|
||||||
$(Q)shards build token-handler $(CRFLAGS)
|
$(Q)shards build token-handler $(CRFLAGS)
|
||||||
|
@ -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 a more thorough documentation, read the manual.
|
||||||
|
|
||||||
# For requests where authentication is required.
|
# 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)
|
zone-basic-template-file: build-write-template-zone-file; $(Q)$(LOC)write-template-zone-file $(DOMAIN)
|
||||||
|
|
||||||
VERBOSITY ?= 4
|
VERBOSITY ?= 4
|
||||||
run-client-verbosity:; $(Q)$(LOC)dnsmanager-client admin maintenance verbosity $(VERBOSITY) $(LOGIN_OPT)
|
run-client-verbosity:; $(Q)$(LOC)dnsmanagerctl admin maintenance verbosity $(VERBOSITY) $(LOGIN_OPT)
|
||||||
run-client-domain-add:; $(Q)$(LOC)dnsmanager-client user domain add $(DOMAIN) $(LOGIN_OPT)
|
run-client-domain-add:; $(Q)$(LOC)dnsmanagerctl user domain add $(DOMAIN) $(LOGIN_OPT)
|
||||||
run-client-domain-del:; $(Q)$(LOC)dnsmanager-client user domain del $(DOMAIN) $(LOGIN_OPT)
|
run-client-domain-del:; $(Q)$(LOC)dnsmanagerctl user domain del $(DOMAIN) $(LOGIN_OPT)
|
||||||
run-client-domain-list:; $(Q)$(LOC)dnsmanager-client user domain list $(LOGIN_OPT)
|
run-client-domain-list:; $(Q)$(LOC)dnsmanagerctl user domain list $(LOGIN_OPT)
|
||||||
run-client-zone-add:; $(Q)$(LOC)dnsmanager-client user zone add $(DOMAIN).json $(LOGIN_OPT)
|
run-client-zone-add:; $(Q)$(LOC)dnsmanagerctl user zone add $(DOMAIN).json $(LOGIN_OPT)
|
||||||
run-client-zone-get:; $(Q)$(LOC)dnsmanager-client user zone get $(DOMAIN) $(LOGIN_OPT)
|
run-client-zone-get:; $(Q)$(LOC)dnsmanagerctl user zone get $(DOMAIN) $(LOGIN_OPT)
|
||||||
|
|
||||||
RRID ?= 1
|
RRID ?= 1
|
||||||
NAME ?=
|
NAME ?=
|
||||||
TTL ?= 3600
|
TTL ?= 3600
|
||||||
TARGET ?=
|
TARGET ?=
|
||||||
run-client-rr-add-a:
|
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:
|
run-client-rr-update-a:
|
||||||
$(Q)$(LOC)dnsmanager-client user rr update A $(DOMAIN) $(RRID) $(NAME) $(TTL) $(TARGET) $(LOGIN_OPT)
|
$(Q)$(LOC)dnsmanagerctl 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-rr-del:; $(Q)$(LOC)dnsmanagerctl user rr del $(DOMAIN) $(RRID) $(LOGIN_OPT)
|
||||||
run-client-genzones:; $(Q)$(LOC)dnsmanager-client admin genall $(LOGIN_OPT)
|
run-client-genzones:; $(Q)$(LOC)dnsmanagerctl admin genall $(LOGIN_OPT)
|
||||||
|
@ -7,18 +7,18 @@ MANDIR ?= $(SHAREDIR)/man
|
|||||||
|
|
||||||
install-dnsmanagerd: build-server
|
install-dnsmanagerd: build-server
|
||||||
$(Q)install -D -m 555 ./bin/dnsmanagerd $(DESTDIR)$(BINDIR)/dnsmanagerd
|
$(Q)install -D -m 555 ./bin/dnsmanagerd $(DESTDIR)$(BINDIR)/dnsmanagerd
|
||||||
install-dnsmanager-client: build-client
|
install-dnsmanagerctl: build-client
|
||||||
$(Q)install -D -m 555 ./bin/dnsmanager-client $(DESTDIR)$(BINDIR)/dnsmanager-client
|
$(Q)install -D -m 555 ./bin/dnsmanagerctl $(DESTDIR)$(BINDIR)/dnsmanagerctl
|
||||||
install-binaries: install-dnsmanagerd install-dnsmanager-client
|
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
|
gz-man-dnsmanagerd:; $(Q)gzip -k -f --best ./man/dnsmanagerd.1
|
||||||
|
|
||||||
install-man-dnsmanagerd: gz-man-dnsmanagerd
|
install-man-dnsmanagerd: gz-man-dnsmanagerd
|
||||||
$(Q)install -D -m 444 ./man/dnsmanagerd.1.gz $(DESTDIR)$(MANDIR)/man1/dnsmanagerd.1.gz
|
$(Q)install -D -m 444 ./man/dnsmanagerd.1.gz $(DESTDIR)$(MANDIR)/man1/dnsmanagerd.1.gz
|
||||||
install-man-dnsmanager-client: gz-man-dnsmanager-client
|
install-man-dnsmanagerctl: gz-man-dnsmanagerctl
|
||||||
$(Q)install -D -m 444 ./man/dnsmanager-client.1.gz $(DESTDIR)$(MANDIR)/man1/dnsmanager-client.1.gz
|
$(Q)install -D -m 444 ./man/dnsmanagerctl.1.gz $(DESTDIR)$(MANDIR)/man1/dnsmanagerctl.1.gz
|
||||||
install-man: install-man-dnsmanagerd install-man-dnsmanager-client
|
install-man: install-man-dnsmanagerd install-man-dnsmanagerctl
|
||||||
|
|
||||||
install-dev-doc: doc ; install -D docs/ $(DESTDIR)$(DOCDIR)
|
install-dev-doc: doc ; install -D docs/ $(DESTDIR)$(DOCDIR)
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
# HOW MIGRATION WORKS, STEP BY STEP (`migration` rule):
|
# 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)
|
# 2. migration-file -> generate $(MIGRATION_FILE_TARGET)
|
||||||
# 3. run-migration-client -> create users and attribute domains
|
# 3. run-migration-client -> create users and attribute domains
|
||||||
# 4. run-client-genzones -> generate Bind9 zone files with dnsmanagerd
|
# 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)
|
./bin/sql-to-migration-format.awk < $(SQLDB) > $(MIGRATION_FILE_TARGET)
|
||||||
|
|
||||||
run-migration-client:
|
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:
|
copy-old-zones:
|
||||||
cd $(BINDDIR) && for i in * ; do cp -v $(OLDBINDDIR)/$$i . ; done
|
cd $(BINDDIR) && for i in * ; do cp -v $(OLDBINDDIR)/$$i . ; done
|
||||||
|
@ -25,7 +25,7 @@ dependencies:
|
|||||||
targets:
|
targets:
|
||||||
dnsmanagerd:
|
dnsmanagerd:
|
||||||
main: src/main.cr
|
main: src/main.cr
|
||||||
dnsmanager-client:
|
dnsmanagerctl:
|
||||||
main: src/client/main.cr
|
main: src/client/main.cr
|
||||||
write-zone-file:
|
write-zone-file:
|
||||||
main: tools/write-zone-file.cr
|
main: tools/write-zone-file.cr
|
||||||
|
@ -90,7 +90,7 @@ class Actions
|
|||||||
|
|
||||||
# Migration script.
|
# 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.)
|
# user-db.txt should be formated as: login <TAB> domain1 <TAB> domain2 <TAB> domain3 (etc.)
|
||||||
def admin_migration_script
|
def admin_migration_script
|
||||||
|
Loading…
Reference in New Issue
Block a user