meson: systemd - rename cache dir to work dir

parent abbf62c2
......@@ -37,7 +37,7 @@ doc_dir = join_paths(prefix, get_option('datadir'), 'doc', 'knot-resolver')
examples_dir = join_paths(doc_dir, 'examples')
etc_dir = join_paths(prefix, get_option('sysconfdir'), 'knot-resolver')
sbin_dir = join_paths(prefix, get_option('sbindir'))
systemd_cache_dir = ''
systemd_work_dir = ''
run_dir = ''
systemd_unit_dir = ''
systemd_tmpfiles_dir = ''
......@@ -191,7 +191,7 @@ message('''
systemd: @0@'''.format(summary_systemd) + '''
socket activation: @0@'''.format(summary_systemd_socket) + '''
user mode: @0@'''.format(summary_systemd_user_mode) + '''
cache_dir: @0@'''.format(systemd_cache_dir) + '''
work_dir: @0@'''.format(systemd_work_dir) + '''
run_dir: @0@'''.format(run_dir) + '''
components
......
......@@ -5,7 +5,7 @@ Documentation=man:kresd(8)
[Service]
Type=notify
WorkingDirectory=@systemd_cache_dir@
WorkingDirectory=@systemd_work_dir@
ExecStart=@sbin_dir@/kresd --config=@etc_dir@/kresd.conf
User=@user@
Restart=on-failure
......
# systemd
## paths
# TODO user mode
systemd_cache_dir = join_paths(
# TODO user mode; prefix==/usr/local
systemd_work_dir = join_paths(
prefix, get_option('localstatedir'), 'cache', 'knot-resolver')
run_dir = join_paths('/run', 'knot-resolver')
systemd_unit_dir = join_paths(prefix, get_option('libdir'), 'systemd', 'system')
......@@ -12,7 +12,7 @@ systemd_tmpfiles_dir = join_paths(prefix, get_option('libdir'), 'tmpfiles.d')
systemd_config = configuration_data()
systemd_config.set('user', user)
systemd_config.set('group', group)
systemd_config.set('systemd_cache_dir', systemd_cache_dir)
systemd_config.set('systemd_work_dir', systemd_work_dir)
systemd_config.set('sbin_dir', sbin_dir)
systemd_config.set('etc_dir', etc_dir)
systemd_config.set('run_dir', run_dir)
......
......@@ -5,7 +5,7 @@ Documentation=man:kresd(8)
[Service]
Type=simple
WorkingDirectory=@systemd_cache_dir@
WorkingDirectory=@systemd_work_dir@
ExecStart=@sbin_dir@/kresd --config=@etc_dir@/kresd.conf --forks=1
Restart=on-failure
......
# tmpfiles.d(5) runtime directory for knot-resolver (kresd)
#Type Path Mode UID GID Age Argument
d @systemd_cache_dir@ 0750 @user@ @group@ - -
d @systemd_work_dir@ 0750 @user@ @group@ - -
# tmpfiles.d(5) directories for knot-resolver (kresd)
#Type Path Mode UID GID Age Argument
d @run_dir@ 0750 root root - -
d @systemd_cache_dir@ 0750 @user@ @group@ - -
d @systemd_work_dir@ 0750 @user@ @group@ - -
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment