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 2e3fd8d9..0f564503 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 b43bf663..00000000 --- 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