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
|
# systemd
# SPDX-License-Identifier: GPL-3.0-or-later
## configuration
systemd_config = configuration_data()
systemd_config.set('user', user)
systemd_config.set('group', group)
systemd_config.set('systemd_work_dir', systemd_work_dir)
systemd_config.set('systemd_cache_dir', systemd_cache_dir)
systemd_config.set('sbin_dir', sbin_dir)
systemd_config.set('etc_dir', etc_dir)
systemd_config.set('run_dir', run_dir)
systemd_config.set('lib_dir', lib_dir)
if systemd_files == '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)
## tmpfiles
tmpfiles = configure_file(
input: 'tmpfiles.d/knot-resolver.conf.in',
output: 'knot-resolver.tmpfiles',
configuration: systemd_config,
)
install_data(
tmpfiles,
rename: ['knot-resolver.conf'],
install_dir: systemd_tmpfiles_dir,
)
## sysusers
sysusers = configure_file(
input: 'sysusers.d/knot-resolver.conf.in',
output: 'knot-resolver.sysusers',
configuration: systemd_config,
)
install_data(
sysusers,
rename: ['knot-resolver.conf'],
install_dir: systemd_sysusers_dir,
)
endif
|