]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
systemd: generate sysusers file
authorTomas Krizek <tomas.krizek@nic.cz>
Mon, 12 Oct 2020 10:53:00 +0000 (12:53 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Mon, 12 Oct 2020 12:57:00 +0000 (14:57 +0200)
meson.build
systemd/meson.build
systemd/sysusers.d/knot-resolver.conf.in [new file with mode: 0644]

index 4eb17169601ae81226c6578546bd88335d30df84..bf43d458b5df41810e09ed54a17d7740b0885d61 100644 (file)
@@ -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
index 59bba965d9ff6f4819bbd8c3cb08ac11ba3772d3..dbc31a94b9b4fbc69059a6acb4bf7f0f9bbebf62 100644 (file)
@@ -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 (file)
index 0000000..ea66e27
--- /dev/null
@@ -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@