mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
lirc: add lircd-uinput service
This commit is contained in:
parent
8cfa64d80c
commit
2ce4f68338
@ -30,6 +30,9 @@ ATTRS{name}=="eventlircd", GOTO="end"
|
||||
ATTRS{name}=="lircd", \
|
||||
ENV{eventlircd_enable}="true"
|
||||
|
||||
ATTRS{name}=="lircd-uinput", \
|
||||
ENV{eventlircd_enable}="true"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Ask eventlircd to handle input event devices created by bdremoteng. For this
|
||||
# to work, bdremoteng must be configured to output Linux input events and must
|
||||
|
@ -33,9 +33,10 @@ case "$ACTION" in
|
||||
if [ ! -e "/run/lirc/lircd-$DEVICE.pid" ]; then
|
||||
|
||||
LIRCD="/usr/sbin/lircd"
|
||||
LIRCD_CONFIG="--uinput --driver=$DRIVER --device=/dev/$DEVICE"
|
||||
LIRCD_CONFIG="--driver=$DRIVER --device=/dev/$DEVICE"
|
||||
LIRCD_CONFIG="$LIRCD_CONFIG --output=/run/lirc/lircd-$DEVICE"
|
||||
LIRCD_CONFIG="$LIRCD_CONFIG --pidfile=/run/lirc/lircd-$DEVICE.pid"
|
||||
LIRCD_CONFIG="$LIRCD_CONFIG --release=_UP"
|
||||
|
||||
if [ -e "/storage/.config/lircd.conf" ]; then
|
||||
LIRCD_CONFIG="$LIRCD_CONFIG /storage/.config/lircd.conf"
|
||||
|
12
packages/sysutils/lirc/system.d/lircd-uinput@.service
Normal file
12
packages/sysutils/lirc/system.d/lircd-uinput@.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=lircd-uinput with %I
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/lircd-uinput /run/lirc/lircd-%I
|
||||
Slice=system-lircd.slice
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -67,6 +67,12 @@ ENV{lircd_driver}=="?*", ENV{lircd_conf}=="?*", ACTION=="add", \
|
||||
TAG+="systemd", ENV{SYSTEMD_WANTS}+="lircd@$name:$env{lircd_driver}:$env{lircd_conf}.service", \
|
||||
RUN+="lircd_wakeup_enable"
|
||||
|
||||
ENV{lircd_driver}=="?*", ENV{lircd_conf}=="?*", ACTION=="add", \
|
||||
TAG+="systemd", ENV{SYSTEMD_WANTS}+="lircd-uinput@$name.service"
|
||||
|
||||
ENV{lircd_driver}=="?*", ENV{lircd_conf}=="?*", ACTION=="remove", \
|
||||
RUN+="/usr/bin/systemctl stop lircd-uinput@$name.service"
|
||||
|
||||
ENV{lircd_driver}=="?*", ENV{lircd_conf}=="?*", ACTION=="remove", \
|
||||
RUN+="/usr/bin/systemctl stop lircd@$name:$env{lircd_driver}:$env{lircd_conf}.service"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user