build(linux): make postinst use which to find sunshine (#2812)

This commit is contained in:
Gilles Schintgen 2024-07-07 18:17:53 +02:00 committed by GitHub
parent 3cc12dfbe7
commit 5cea1e1458
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,9 +2,10 @@
# Ensure Sunshine can grab images from KMS
path_to_setcap=$(which setcap)
path_to_sunshine=$(readlink -f $(which sunshine))
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)
echo "$path_to_setcap cap_sys_admin+p $path_to_sunshine"
$path_to_setcap cap_sys_admin+p $path_to_sunshine
fi
# Trigger udev rule reload for /dev/uinput