mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-11-16 23:10:13 +00:00
756d2e19b2
Some checks failed
CI / GitHub Env Debug (push) Has been cancelled
CI / Setup Release (push) Has been cancelled
CI / Setup Flatpak Matrix (push) Has been cancelled
CI Docker / Check Dockerfiles (push) Has been cancelled
CodeQL / Get language matrix (push) Has been cancelled
Build GH-Pages / update_pages (push) Has been cancelled
CI / Linux Flatpak (push) Has been cancelled
CI / Linux ${{ matrix.type }} (--appimage-build, 22.04, AppImage) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 13) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 14) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest, true) (push) Has been cancelled
CI / Macports (macOS-${{ matrix.os_version }}) (13, true) (push) Has been cancelled
CI / Macports (macOS-${{ matrix.os_version }}) (14) (push) Has been cancelled
CI / Windows (push) Has been cancelled
CI Docker / Setup Release (push) Has been cancelled
CI Docker / Docker${{ matrix.tag }} (push) Has been cancelled
CodeQL / Analyze (${{ matrix.name }}) (push) Has been cancelled
33 lines
1.2 KiB
Bash
33 lines
1.2 KiB
Bash
#!/bin/sh
|
|
|
|
# Check if we're in an rpm-ostree environment
|
|
if [ ! -x "$(command -v rpm-ostree)" ]; then
|
|
echo "Not in an rpm-ostree environment, proceeding with post install steps."
|
|
|
|
# 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 "Setting CAP_SYS_ADMIN capability on Sunshine binary."
|
|
echo "$path_to_setcap cap_sys_admin+p $path_to_sunshine"
|
|
$path_to_setcap cap_sys_admin+p $path_to_sunshine
|
|
echo "CAP_SYS_ADMIN capability set on Sunshine binary."
|
|
else
|
|
echo "error: setcap not found or not executable."
|
|
fi
|
|
|
|
# Trigger udev rule reload for /dev/uinput and /dev/uhid
|
|
path_to_udevadm=$(which udevadm)
|
|
if [ -x "$path_to_udevadm" ] ; then
|
|
echo "Reloading udev rules."
|
|
$path_to_udevadm control --reload-rules
|
|
$path_to_udevadm trigger --property-match=DEVNAME=/dev/uinput
|
|
$path_to_udevadm trigger --property-match=DEVNAME=/dev/uhid
|
|
echo "Udev rules reloaded successfully."
|
|
else
|
|
echo "error: udevadm not found or not executable."
|
|
fi
|
|
else
|
|
echo "rpm-ostree environment detected, skipping post install steps. Restart to apply the changes."
|
|
fi
|