add systemd
This commit is contained in:
parent
28480a6de2
commit
d19f8bcffa
@ -1 +1,2 @@
|
||||
subdir('openrc')
|
||||
subdir('systemd')
|
||||
|
@ -1,3 +1,5 @@
|
||||
openrc = get_option('openrc')
|
||||
|
||||
openrc_config_data = configuration_data()
|
||||
openrc_config_data.set('SBINDIR', join_paths(get_option('prefix'), get_option('sbindir')))
|
||||
openrc_config_data.set('LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
|
||||
|
17
contrib/systemd/meson.build
Normal file
17
contrib/systemd/meson.build
Normal file
@ -0,0 +1,17 @@
|
||||
systemd = get_option('systemd')
|
||||
|
||||
systemd_config_data = configuration_data()
|
||||
systemd_config_data.set('LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir'), meson.project_name()))
|
||||
|
||||
systemd_config_data_file = configure_file(
|
||||
input: 'tufmanager.service.in',
|
||||
output: 'tufmanager.service',
|
||||
configuration: systemd_config_data
|
||||
)
|
||||
|
||||
if systemd
|
||||
install_data(
|
||||
systemd_config_data_file,
|
||||
install_dir: join_paths(get_option('prefix'), 'lib', 'systemd', 'system')
|
||||
)
|
||||
endif
|
6
contrib/systemd/tufmanager.service.in
Normal file
6
contrib/systemd/tufmanager.service.in
Normal file
@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=TUF Manager Server
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=@LIBEXECDIR@/tuf-server
|
@ -2,3 +2,4 @@
|
||||
Name=org.tuf.manager.server
|
||||
Exec=@LIBEXECDIR@/tuf-server
|
||||
User=root
|
||||
SystemdService=tufmanager.service
|
||||
|
@ -21,7 +21,6 @@ add_global_arguments(
|
||||
always_authenticated = get_option('always-authenticated')
|
||||
build_cli = get_option('build-cli')
|
||||
build_gui = get_option('build-gui')
|
||||
openrc = get_option('openrc')
|
||||
|
||||
subdir('po')
|
||||
subdir('data')
|
||||
|
@ -34,3 +34,9 @@ option(
|
||||
value: false,
|
||||
description: 'Install OpenRC script'
|
||||
)
|
||||
option(
|
||||
'systemd',
|
||||
type : 'boolean',
|
||||
value: false,
|
||||
description: 'Install systemd unit'
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user