summaryrefslogtreecommitdiffstats
path: root/doc/kresctl.8.in
blob: 538356afce243a9f973f37e264ac678e52640d5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.TH "kresctl" "8" "@date@" "CZ.NIC" "Knot Resolver @version@"
.\"
.\" kresctl.8 -- Knot Resolver control tool manpage
.\"
.\" Copyright (c) CZ.NIC. All rights reserved.
.\"
.\" SPDX-License-Identifier: GPL-3.0-or-later
.\"
.\"
.SH "NAME"
.B kresctl
\- Control Knot Resolver @version@, the full caching DNSSEC-enabled resolver
.SH "SYNOPSIS"
.B kresctl
.RB [ \-s | \-\-socket
.IR API_SOCKET ]
.IR <command>
.IR <args>
.SH "DESCRIPTION"
.B \fIkresctl\fR is a control tool for Knot Resolver, a DNSSEC-enabled full caching resolver.
.P

\fBkresctl\fR may be used to control and inspect the configuration of running
Knot Resolver via its HTTP API.

Full documentation is available at
\fIhttps://www.knot-resolver.cz/documentation/latest/\fR or in package
documentation (available as knot-resolver-doc package in most distributions.
.SH OPTIONS
The available options are:
.TP
.B \-s\fI <api_socket>\fR, \fB\-\-socket \fI<api_socket>

Specify how to connect to a running Knot Resolver. Accepts path to Unix-domain
socket  or \fIhost:port\fR. Defaults to \fI/var/run/knot-resolver/manager.sock\fR

Some commands do not require communication with the running resolver. In such
cases, the value of this option is ignored and the command may succeed even
if the socket is invalid.
.B \-h, --help
Print help message and exit.
.SH COMMANDS
.TP
.B config [-d|--delete] [--stdin] \fIjson_ptr\fR \fI[new_value]\fR
Get or modify resolver's runtime configuration.

\fIjson_ptr\fR follows \fBRFC 6901\fR and specifies, which part of the configuration
will the tool operate on. This argument is required. When not given any additional
options or arguments, prints the current configured value. Equivalent to GET method
in the underlying HTTP API.

When \fB-d\fR or \fB--delete\fR is provided, \fBkresctl\fB tries to remove
the runtime configuration subtree. The operation fails if it renders the
configuration invalid. Equivalent to the DELETE method in the HTTP API.

When \fB--stdin\fR or \fInew_value\fR are provided, the new value (from the
argument or from reading stdin) is put into the configuration at the given
\fIjson_ptr\fR. The operation fails if it renders the configuration invalid.
Equivalent to PUT method in the underlying HTTP API.
.TP
.B stop
Gracefully stops the running resolver.
.SH "SEE ALSO"
\fBkresd(8)\fR, @man_seealso_systemd@\fIhttps://www.knot-resolver.cz/documentation/latest/\fR
.SH "AUTHORS"
.B kresd
developers are mentioned in the AUTHORS file in the distribution.