add pid file to systemd unit and move services to data folder
This commit is contained in:
17
data/systemd/meson.build
Normal file
17
data/systemd/meson.build
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
)
|
||||
|
||||
systemd = find_program ('systemd', required: false)
|
||||
|
||||
if systemd.found()
|
||||
install_data(
|
||||
systemd_config_data_file,
|
||||
install_dir: join_paths(get_option('prefix'), 'lib', 'systemd', 'system')
|
||||
)
|
||||
endif
|
10
data/systemd/tufmanager.service.in
Normal file
10
data/systemd/tufmanager.service.in
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=TUF Manager Server
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/tufmanager/pid
|
||||
ExecStart=@LIBEXECDIR@/tuf-server
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user