diff options
author | Vasek Sraier <git@vakabus.cz> | 2022-12-03 09:36:27 +0100 |
---|---|---|
committer | Vasek Sraier <git@vakabus.cz> | 2022-12-03 11:31:10 +0100 |
commit | a3a56ecc9c129b9659dd844fab6d4dad43e4fecd (patch) | |
tree | 3b9bb0917b6838f68761a1bd3169821312598b04 /systemd | |
parent | manager: utils: renaming: added basic docs (diff) | |
download | knot-resolver-a3a56ecc9c129b9659dd844fab6d4dad43e4fecd.tar.xz knot-resolver-a3a56ecc9c129b9659dd844fab6d4dad43e4fecd.zip |
packaging: kresctl man page, manager's unit file
Diffstat (limited to 'systemd')
-rw-r--r-- | systemd/knot-resolver.service.in | 23 | ||||
-rw-r--r-- | systemd/meson.build | 6 |
2 files changed, 29 insertions, 0 deletions
diff --git a/systemd/knot-resolver.service.in b/systemd/knot-resolver.service.in new file mode 100644 index 00000000..3c8d2477 --- /dev/null +++ b/systemd/knot-resolver.service.in @@ -0,0 +1,23 @@ +[Unit] +Description=Knot Resolver Manager +Documentation=man:knot-resolver.systemd(7) +Wants=network-online.target +After=network-online.target +Before=nss-lookup.target +Wants=nss-lookup.target + +[Service] +Type=notify +TimeoutStartSec=10s +ExecStart=/usr/bin/env python3 -m knot_resolver_manager --config=/etc/knot-resolver/config.yml +KillSignal=SIGINT +WorkingDirectory=/var/run/knot-resolver/ +User=@user@ +Group=@group@ +CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_SETPCAP +AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_SETPCAP +# See systemd.service(5) for explanation, why we should replace this with a blocking request +# ExecReload=/usr/bin/env kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target
\ No newline at end of file diff --git a/systemd/meson.build b/systemd/meson.build index 6ca0bac1..17bad828 100644 --- a/systemd/meson.build +++ b/systemd/meson.build @@ -30,6 +30,12 @@ if systemd_files == 'enabled' sources: 'kresd.target', install_dir: systemd_unit_dir, ) + manager_service = configure_file( + input: 'knot-resolver.service.in', + output: 'knot-resolver.service', + configuration: systemd_config, + install_dir: systemd_unit_dir, + ) ## man page kresd_systemd_man = configure_file( |