Skip to content

Commit

Permalink
fix: sunshine is a symlink
Browse files Browse the repository at this point in the history
follow the symlink to get the actual binary.
  • Loading branch information
m2Giles committed Jan 8, 2024
1 parent b2d3906 commit 3b23a38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down

This file was deleted.

0 comments on commit 3b23a38

Please sign in to comment.