diff options
| author | Shulhan <ms@kilabit.info> | 2022-04-16 22:30:27 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-04-16 22:30:27 +0700 |
| commit | 0156deaaaa0edbb93cfbf60a8cac99fc17d63a60 (patch) | |
| tree | 0e373dd81bf402acc78ddc19356f78cb81d5cdb2 /_doc/resolver.adoc | |
| parent | 8947cc8b6a9751b3cae3d4d22fdf3ac154f77dfd (diff) | |
| download | rescached-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/resolver.adoc')
| -rw-r--r-- | _doc/resolver.adoc | 16 |
1 files changed, 16 insertions, 0 deletions
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 |
