data: Add systemd unit to start alert slider service
This commit is contained in:
committed by
Guido Günther
parent
0a2392db3f
commit
7ea55aeaf5
@@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Feedbackd Alert Slider Handler
|
||||||
|
PartOf=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=@libexecdir@/fbd-alert-slider
|
||||||
|
Restart=on-abnormal
|
||||||
|
RestartSec=10s
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical-session.target
|
||||||
@@ -72,4 +72,24 @@ if get_option('udev')
|
|||||||
install_data('90-feedbackd.rules', install_dir: udevdir)
|
install_data('90-feedbackd.rules', install_dir: udevdir)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
systemd_user_unit_dir = get_option('systemd_user_unit_dir')
|
||||||
|
systemd_dep = dependency('systemd', required: false)
|
||||||
|
if systemd_user_unit_dir == ''
|
||||||
|
if systemd_dep.found()
|
||||||
|
systemd_user_unit_dir = systemd_dep.get_variable('systemd_user_unit_dir')
|
||||||
|
else
|
||||||
|
systemd_user_unit_dir = prefix / libdir / 'systemd' / 'user'
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Alert slider Systemd user service
|
||||||
|
alert_slider_unit = 'fbd-alert-slider.service'
|
||||||
|
configure_file(
|
||||||
|
input : alert_slider_unit + '.in',
|
||||||
|
output : alert_slider_unit,
|
||||||
|
configuration : service_data,
|
||||||
|
install : true,
|
||||||
|
install_dir : systemd_user_unit_dir,
|
||||||
|
)
|
||||||
|
|
||||||
endif # daemon
|
endif # daemon
|
||||||
|
|||||||
Vendored
+1
@@ -1,4 +1,5 @@
|
|||||||
usr/bin/
|
usr/bin/
|
||||||
|
usr/lib/systemd/user
|
||||||
usr/lib/udev/
|
usr/lib/udev/
|
||||||
usr/libexec/
|
usr/libexec/
|
||||||
usr/share/dbus-1/
|
usr/share/dbus-1/
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ if get_option('daemon')
|
|||||||
gsound = dependency('gsound')
|
gsound = dependency('gsound')
|
||||||
gudev = dependency('gudev-1.0', version: '>=232')
|
gudev = dependency('gudev-1.0', version: '>=232')
|
||||||
json_glib = dependency('json-glib-1.0')
|
json_glib = dependency('json-glib-1.0')
|
||||||
|
systemd_dep = dependency('systemd', required: false)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
prefix = get_option('prefix')
|
prefix = get_option('prefix')
|
||||||
|
|||||||
@@ -16,3 +16,6 @@ option('man',
|
|||||||
option('tests',
|
option('tests',
|
||||||
type: 'boolean', value: true,
|
type: 'boolean', value: true,
|
||||||
description: 'Whether to compile unit tests')
|
description: 'Whether to compile unit tests')
|
||||||
|
option('systemd_user_unit_dir',
|
||||||
|
type: 'string', value: '',
|
||||||
|
description: 'Directory for systemd user units')
|
||||||
|
|||||||
Reference in New Issue
Block a user