Skip to content

Commit

Permalink
fix: Correct sunshine-workaround service issue
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Feb 1, 2024
1 parent 7b4e7b8 commit f0f509e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ 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 $(readlink /usr/bin/sunshine) /usr/local/bin/.sunshine"
ExecStartPre=/usr/bin/bash -c "[ -x /usr/local/bin/.sunshine ] || /usr/bin/cp $(readlink -f /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
ExecStartPre=/usr/bin/bash -c "/usr/bin/mount --bind /usr/local/bin/.sunshine $(readlink -f /usr/bin/sunshine)"
# Fix caps
ExecStart=/usr/sbin/setcap cap_sys_admin+p /usr/bin/sunshine
ExecStart=/usr/bin/bash -c "/usr/sbin/setcap cap_sys_admin+p $(readlink -f /usr/bin/sunshine)"
# Clean-up after ourselves
ExecStop=/usr/bin/umount /usr/bin/sunshine
ExecStop=/usr/bin/bash -c "/usr/bin/umount $(readlink -f /usr/bin/sunshine)"
ExecStop=/usr/bin/rm /usr/local/bin/.sunshine
RemainAfterExit=yes

Expand Down

0 comments on commit f0f509e

Please sign in to comment.