From: Tomas Krizek Date: Mon, 12 Oct 2020 10:53:00 +0000 (+0200) Subject: systemd: generate sysusers file X-Git-Tag: v5.2.0~16^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=996de8c499baa3fb0b02f4a250ca3f6ad59e75fb;p=thirdparty%2Fknot-resolver.git systemd: generate sysusers file --- diff --git a/meson.build b/meson.build index 4eb171696..bf43d458b 100644 --- a/meson.build +++ b/meson.build @@ -57,6 +57,7 @@ systemd_work_dir = join_paths(prefix, get_option('localstatedir'), 'lib', 'knot- systemd_cache_dir = join_paths(prefix, get_option('localstatedir'), 'cache', 'knot-resolver') systemd_unit_dir = join_paths(prefix, 'lib', 'systemd', 'system') systemd_tmpfiles_dir = join_paths(prefix, 'lib', 'tmpfiles.d') +systemd_sysusers_dir = join_paths(prefix, 'lib', 'sysusers.d') mod_inc_dir = include_directories('.', 'contrib/') ## Trust anchors diff --git a/systemd/meson.build b/systemd/meson.build index 59bba965d..dbc31a94b 100644 --- a/systemd/meson.build +++ b/systemd/meson.build @@ -46,4 +46,12 @@ if systemd_files == 'enabled' configuration: systemd_config, install_dir: systemd_tmpfiles_dir, ) + + ## sysusers + sysusers = configure_file( + input: 'sysusers.d/knot-resolver.conf.in', + output: 'knot-resolver.conf', + configuration: systemd_config, + install_dir: systemd_sysusers_dir, + ) endif diff --git a/systemd/sysusers.d/knot-resolver.conf.in b/systemd/sysusers.d/knot-resolver.conf.in new file mode 100644 index 000000000..ea66e2772 --- /dev/null +++ b/systemd/sysusers.d/knot-resolver.conf.in @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: CC0-1.0 +# sysusers.d(5) file for knot-resolver (kresd) +#Type Name ID GECOS Home directory Shell +u @user@ - "Knot Resolver Daemon User" +g @group@