.B stop
Gracefully stops the running resolver.
.SH "SEE ALSO"
-\fBkresd(8)\fR, @man_seealso_systemd@\fIhttps://www.knot-resolver.cz/documentation/latest/\fR
+\fBkresd(8)\fR, \fIhttps://www.knot-resolver.cz/documentation/latest/\fR
.SH "AUTHORS"
.B kresd
developers are mentioned in the AUTHORS file in the distribution.
.B \-V
Show the version.
.SH "SEE ALSO"
-@man_seealso_systemd@\fIhttps://www.knot-resolver.cz/documentation/latest/\fR
+\fIhttps://www.knot-resolver.cz/documentation/latest/\fR
.SH "AUTHORS"
.B kresd
developers are mentioned in the AUTHORS file in the distribution.
man_config.set('version', meson.project_version())
man_config.set('date', run_command('../scripts/lib/get-date.sh', check: true).stdout())
-man_config.set('man_seealso_systemd', '')
-if systemd_legacy_units == 'enabled'
- man_config.set('man_seealso_systemd', '\\fIkresd.systemd(7)\\fR, ')
-endif
-
man_kresd = configure_file(
input: 'kresd.8.in',
output: 'kresd.8',
### Systemd; most is in systemd/meson.build
systemd_files = get_option('systemd_files')
-systemd_legacy_units = get_option('systemd_legacy_units')
libsystemd = dependency('libsystemd', required: systemd_files == 'enabled')
summary({'libsystemd support': libsystemd.found(),
'files': systemd_files == 'enabled',
description: 'installs systemd-related files',
)
-option(
- 'systemd_legacy_units',
- type: 'combo',
- choices: [
- 'disabled',
- 'enabled',
- ],
- value: 'disabled',
- description: 'installs legacy systemd units for running without manager, like with versions before 6',
-)
-
# Component options
option(
'bench',
+++ /dev/null
-# SPDX-License-Identifier: CC0-1.0
-[Unit]
-Description=Knot Resolver Garbage Collector daemon
-Documentation=man:kresd.systemd(7)
-Documentation=man:kresd(8)
-
-[Service]
-Type=simple
-ExecStart=@sbin_dir@/kres-cache-gc -c @systemd_cache_dir@ -d 1000
-User=@user@
-Group=@group@
-Restart=on-failure
-RestartSec=30
-StartLimitInterval=400
-StartLimitBurst=10
-Slice=system-kresd.slice
-
-[Install]
-WantedBy=kresd.target
+++ /dev/null
-.TH "kresd.systemd" "7" "@date@" "CZ.NIC" "Knot Resolver @version@ Systemd Units"
-.\"
-.\" kresd.systemd.7 -- man page for systemd units for kresd
-.\"
-.\" Copyright (c) CZ.NIC. All rights reserved.
-.\"
-.\" SPDX-License-Identifier: GPL-3.0-or-later
-.\"
-.\"
-.SH "NAME"
-kresd.systemd
-\- managing Knot Resolver @version@ through systemd.
-
-.SH "SYNOPSIS"
-.nf
-kresd@.service
-kresd.target
-system-kresd.slice
-.fi
-
-.SH "DESCRIPTION"
-.P
-This manual page describes how to manage \fBkresd\fR using \fBsystemd\fR
-units.
-
-.B QUICKSTART
-
-.nf
-.RS 4n
-\fBsystemctl start kresd@1\fR - single instance of kresd, responding on localhost
-.RE
-.fi
-
-.B CONCURRENT DAEMONS
-
-\fBkresd\fR daemon can be executed in multiple independent processes, which are
-managed with \fBsystemd\fR via systemd templates (see \fBsystemd.unit\fR(5)).
-Each \fBsystemd\fR service instance of \fBkresd\fR (\fIkresd@.service\fR)
-represents a single, independent kresd process.
-
-If you have more than one CPU core available, a single running \fBkresd\fR
-daemon will only be able to make use of one core at a time, leaving the other
-cores idle. If you want \fBkresd\fR to take advantage of all available cores,
-while sharing both cache and sockets, you should enable and start as many
-instances of the \fBkresd@.service\fR as you have cores. Typically, each
-instance is just named \fIkresd@\fBN\fI.service\fR, where \fIN\fR is a decimal
-number. For example, to enable and start 3 concurrent daemons:
-
-.nf
-.RS 4n
-.B systemctl enable --now kresd@1.service kresd@2.service kresd@3.service
-.RE
-.fi
-
-The systemd-managed \fBkresd\fR service set is grouped in the
-\fIsystem-kresd.slice\fR slice. The slice includes all running daemons
-(instances of \fIkresd@.service\fR).
-
-.SH "EXAMPLES"
-
-To start a single kresd instance and enable it at boot:
-.nf
-.RS 4n
-.B systemctl enable --now kresd@1.service
-.RE
-.fi
-
-To restart (or stop) all running instances, you can use a glob expression.
-Please note that glob can't be used to start or enable instances.
-.nf
-.RS 4n
-.B systemctl restart 'kresd@*'
-.RE
-.fi
-
-Bash users can also use Brace Expansion to enable or start multiple instances,
-instead of listing them manually.
-.nf
-.RS 4n
-.B systemctl enable --now kresd@{1..4}.service
-.RE
-.fi
-
-To start all enabled kresd daemons, you can also use the provided \fIkresd.target\fR:
-.nf
-.RS 4n
-.B systemctl start kresd.target
-.RE
-.fi
-
-.RE
-
-.SH "SEE ALSO"
-\fIkresd(8)\fR,
-\fIsystemd.unit(5)\fR,
-\fIhttps://www.knot-resolver.cz/documentation/latest/\fR
-
-.SH "AUTHORS"
-.B kresd
-developers are mentioned in the AUTHORS file in the distribution.
+++ /dev/null
-# SPDX-License-Identifier: CC0-1.0
-[Unit]
-Description=Knot Resolver daemons
-Documentation=man:kresd.systemd(7)
-Documentation=man:kresd(8)
-After=network-online.target
-
-[Install]
-WantedBy=multi-user.target
+++ /dev/null
-# SPDX-License-Identifier: CC0-1.0
-[Unit]
-Description=Knot Resolver daemon
-Documentation=man:kresd.systemd(7)
-Documentation=man:kresd(8)
-Wants=kres-cache-gc.service
-Before=kres-cache-gc.service
-Wants=network-online.target
-After=network-online.target
-Before=nss-lookup.target
-Wants=nss-lookup.target
-
-[Service]
-Type=notify
-Environment="SYSTEMD_INSTANCE=%i"
-WorkingDirectory=@systemd_work_dir@
-ExecStart=@sbin_dir@/kresd -c @lib_dir@/distro-preconfig.lua -c @etc_dir@/kresd.conf -n
-ExecStopPost=/usr/bin/env rm -f "@run_dir@/control/%i"
-User=@user@
-Group=@group@
-CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_SETPCAP
-AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_SETPCAP
-TimeoutStopSec=10s
-WatchdogSec=10s
-Restart=on-abnormal
-LimitNOFILE=524288
-Slice=system-kresd.slice
-
-[Install]
-WantedBy=kresd.target
systemd_config.set('run_dir', run_dir)
systemd_config.set('lib_dir', lib_dir)
-if systemd_legacy_units == 'enabled'
-
- ## unit files
- kresd_service = configure_file(
- input: 'kresd@.service.in',
- output: 'kresd@.service',
- configuration: systemd_config,
- install_dir: systemd_unit_dir,
- )
- kres_cache_gc_service = configure_file(
- input: 'kres-cache-gc.service.in',
- output: 'kres-cache-gc.service',
- configuration: systemd_config,
- install_dir: systemd_unit_dir,
- )
- install_data(
- sources: 'kresd.target',
- install_dir: systemd_unit_dir,
- )
- ## man page
- kresd_systemd_man = configure_file(
- input: 'kresd.systemd.7.in',
- output: 'kresd.systemd.7',
- configuration: man_config,
- )
- install_man(kresd_systemd_man)
-
-endif
-
-
if systemd_files == 'enabled'
manager_service = configure_file(