data: Add systemd unit to start alert slider service

This commit is contained in:
Guido Günther
2024-09-27 07:27:08 +00:00
committed by Guido Günther
parent 0a2392db3f
commit 7ea55aeaf5
5 changed files with 36 additions and 0 deletions
+11
View File
@@ -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
+20
View File
@@ -72,4 +72,24 @@ if get_option('udev')
install_data('90-feedbackd.rules', install_dir: udevdir)
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