diff options
| author | Shulhan <ms@kilabit.info> | 2022-04-24 11:09:48 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-04-24 11:09:48 +0700 |
| commit | b6ae7b07309af5d0e4fd6b6d2615184054f98dd7 (patch) | |
| tree | 81e4817d25fcf4d3922fa42a37e772b0cb143e8c /_doc/resolver.adoc | |
| parent | 660b5bd309fa63cf3762e6eb5a5aaae29bc91129 (diff) | |
| download | rescached-b6ae7b07309af5d0e4fd6b6d2615184054f98dd7.tar.xz | |
cmd/resolver: implement command to manage hosts.d
The resolver cli now have command "hosts.d" to create, delete, and get
the hosts file inside the hosts.d in the rescached server.
Diffstat (limited to '_doc/resolver.adoc')
| -rw-r--r-- | _doc/resolver.adoc | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/_doc/resolver.adoc b/_doc/resolver.adoc index d4eb5e9..98bb5e3 100644 --- a/_doc/resolver.adoc +++ b/_doc/resolver.adoc @@ -151,6 +151,25 @@ If the argument is "-", the new environment is read from stdin. If the environment is valid, the server will be restarted. -- +hosts.d create <name>:: ++ +-- +Create new hosts file inside the hosts.d directory with specific file +name. +-- + +hosts.d delete <name>:: ++ +-- +Delete hosts file inside the hosts.d directory by file name. +-- + +hosts.d get <name>:: ++ +-- +Get the content of hosts file inside the hosts.d directory by file name. +-- + == EXIT STATUS @@ -210,6 +229,36 @@ Update the server environment by reading JSON from standard input, $ cat /tmp/env.json | resolver env update - +Create new hosts file named "myhosts" inside the hosts.d directory, + + $ resolver hosts.d create myhosts + OK + +Delete hosts file named "myhosts" inside the hosts.d directory, + + $ resolver hosts.d delete myhosts + OK + +Get the content of hosts file named "myhosts" inside the hosts.d directory, + + $ resolver hosts.d get myhosts + [ + { + "Value": "127.0.0.1", + "Name": "localhost", + "Type": 1, + "Class": 1, + "TTL": 604800 + }, + { + "Value": "::1", + "Name": "localhost", + "Type": 28, + "Class": 1, + "TTL": 604800 + } + ] + == AUTHOR |
