Apply udev rules to /dev/uinput immediately after installation

This commit is contained in:
Cameron Gutman 2024-03-10 20:06:59 -05:00
commit 3181d91edf
4 changed files with 21 additions and 20 deletions

View file

@ -6,3 +6,10 @@ if [ -x "$path_to_setcap" ] ; then
echo "$path_to_setcap cap_sys_admin+p /usr/bin/sunshine"
$path_to_setcap cap_sys_admin+p $(readlink -f /usr/bin/sunshine)
fi
# Trigger udev rule reload for /dev/uinput
path_to_udevadm=$(which udevadm)
if [ -x "$path_to_udevadm" ] ; then
$path_to_udevadm control --reload-rules
$path_to_udevadm trigger --property-match=DEVNAME=/dev/uinput
fi