From 3b23a385c20d14f55abec6e43b95793ace9ed376 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 8 Jan 2024 07:18:35 -0500 Subject: [PATCH] fix: sunshine is a symlink follow the symlink to get the actual binary. --- .../shared/usr/lib/systemd/system/sunshine-workaround.service | 4 ++-- .../shared/usr/lib/tmpfiles.d/sunshine-workaround.conf | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 system_files/desktop/shared/usr/lib/tmpfiles.d/sunshine-workaround.conf diff --git a/system_files/desktop/shared/usr/lib/systemd/system/sunshine-workaround.service b/system_files/desktop/shared/usr/lib/systemd/system/sunshine-workaround.service index 2e3fd8d9be..0f56450373 100644 --- a/system_files/desktop/shared/usr/lib/systemd/system/sunshine-workaround.service +++ b/system_files/desktop/shared/usr/lib/systemd/system/sunshine-workaround.service @@ -1,12 +1,12 @@ [Unit] Description=Workaround sunshine not having the correct caps -ConditionFileIsExecutable=/usr/bin/sunshine +ConditionPathIsSymbolicLink=/usr/bin/sunshine After=local-fs.target [Service] Type=oneshot # Copy if it doesn't exist -ExecStartPre=/usr/bin/bash -c "[ -x /usr/local/bin/.sunshine ] || /usr/bin/cp /usr/bin/sunshine /usr/local/bin/.sunshine" +ExecStartPre=/usr/bin/bash -c "[ -x /usr/local/bin/.sunshine ] || /usr/bin/cp $(readlink /usr/bin/sunshine) /usr/local/bin/.sunshine" # This is faster than using .mount unit. Also allows for the previous line/cleanup ExecStartPre=/usr/bin/mount --bind /usr/local/bin/.sunshine /usr/bin/sunshine # Fix caps diff --git a/system_files/desktop/shared/usr/lib/tmpfiles.d/sunshine-workaround.conf b/system_files/desktop/shared/usr/lib/tmpfiles.d/sunshine-workaround.conf deleted file mode 100644 index b43bf66379..0000000000 --- a/system_files/desktop/shared/usr/lib/tmpfiles.d/sunshine-workaround.conf +++ /dev/null @@ -1 +0,0 @@ -C /usr/local/bin/.sunshine - - - - /usr/bin/sunshine