aboutsummaryrefslogtreecommitdiff
path: root/_doc
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-04-16 22:30:27 +0700
committerShulhan <ms@kilabit.info>2022-04-16 22:30:27 +0700
commit0156deaaaa0edbb93cfbf60a8cac99fc17d63a60 (patch)
tree0e373dd81bf402acc78ddc19356f78cb81d5cdb2 /_doc
parent8947cc8b6a9751b3cae3d4d22fdf3ac154f77dfd (diff)
downloadrescached-0156deaaaa0edbb93cfbf60a8cac99fc17d63a60.tar.xz
cmd/resolver: implement sub command to update environment
The env command now accept sub command "update" with argument path to the file or "-" for standard input. The content of file is formatted using JSON, the same as output of "env" command. If the content of file is valid, server will be restarted immediately.
Diffstat (limited to '_doc')
-rw-r--r--_doc/resolver.1.gzbin2226 -> 2373 bytes
-rw-r--r--_doc/resolver.adoc16
2 files changed, 16 insertions, 0 deletions
diff --git a/_doc/resolver.1.gz b/_doc/resolver.1.gz
index db15a61..c24c77c 100644
--- a/_doc/resolver.1.gz
+++ b/_doc/resolver.1.gz
Binary files differ
diff --git a/_doc/resolver.adoc b/_doc/resolver.adoc
index 46fbc15..179b976 100644
--- a/_doc/resolver.adoc
+++ b/_doc/resolver.adoc
@@ -121,6 +121,14 @@ env::
Fetch the current server environment and print it as JSON format to stdout.
--
+env update <path-to-file / "-">::
++
+--
+Update the server environment from JSON formatted file.
+If the argument is "-", the new environment is read from stdin.
+If the environment is valid, the server will be restarted.
+--
+
== EXIT STATUS
@@ -172,6 +180,14 @@ Fetch and print current server environment,
$ resolver env
+Update the server environment from JSON file in /tmp/env.json,
+
+ $ resolver env update /tmp/env.json
+
+Update the server environment by reading JSON from standard input,
+
+ $ cat /tmp/env.json | resolver env update -
+
== AUTHOR