mirror of
https://github.com/LizardByte/Sunshine.git
synced 2026-08-07 18:36:34 +00:00
fix(linux): use FQDN naming for all Linux packaging types (#4779)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
# @PROJECT_DESCRIPTION@
|
||||
# The unprivileged service should preset to disabled
|
||||
|
||||
disable app-@PROJECT_FQDN@.service
|
||||
@@ -1,4 +0,0 @@
|
||||
# @PROJECT_DESCRIPTION@
|
||||
# KMS service should preset to disabled
|
||||
|
||||
disable sunshine-kms.service
|
||||
@@ -57,7 +57,7 @@ function install() {
|
||||
mkdir -p ~/.config/systemd/user
|
||||
cp -r "$SUNSHINE_SHARE_HERE/systemd/user/" ~/.config/systemd/
|
||||
# patch service executable path
|
||||
sed -i -e "s#$SUNSHINE_PATH#$(readlink -f $ARGV0)#g" ~/.config/systemd/user/sunshine.service
|
||||
sed -i -e "s#$SUNSHINE_PATH#$(readlink -f $ARGV0)#g" ~/.config/systemd/user/app-dev.lizardbyte.app.Sunshine.service
|
||||
|
||||
# setcap
|
||||
sudo setcap cap_sys_admin+p "$(readlink -f "$SUNSHINE_BIN_HERE")"
|
||||
@@ -71,7 +71,7 @@ function remove() {
|
||||
sudo rm -f /etc/modules-load.d/60-sunshine.conf
|
||||
|
||||
# remove service
|
||||
sudo rm -f ~/.config/systemd/user/sunshine.service
|
||||
sudo rm -f ~/.config/systemd/user/app-dev.lizardbyte.app.Sunshine.service
|
||||
}
|
||||
|
||||
# process arguments
|
||||
|
||||
+2
-1
@@ -3,7 +3,7 @@ Description=@PROJECT_DESCRIPTION@
|
||||
StartLimitIntervalSec=500
|
||||
StartLimitBurst=5
|
||||
Conflicts=sunshine.service
|
||||
After=graphical-session.target xdg-desktop-autostart.target
|
||||
After=graphical-session.target xdg-desktop-autostart.target xdg-desktop-portal.service
|
||||
|
||||
[Service]
|
||||
# Avoid starting Sunshine before the desktop is fully initialized.
|
||||
@@ -12,6 +12,7 @@ ExecStartPre=/bin/sleep 5
|
||||
@SUNSHINE_SERVICE_STOP_COMMAND@
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
NoNewPrivileges=true
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
@@ -386,9 +386,8 @@ fi
|
||||
%caps(cap_sys_admin+p) %{_bindir}/sunshine-*
|
||||
|
||||
# Systemd unit/preset files for user services
|
||||
%{_userunitdir}/sunshine.service
|
||||
%{_userunitdir}/sunshine-kms.service
|
||||
%{_userpresetdir}/00-sunshine-kms.preset
|
||||
%{_userunitdir}/*.service
|
||||
%{_userpresetdir}/*.preset
|
||||
|
||||
# Udev rules
|
||||
%{_udevrulesdir}/*-sunshine.rules
|
||||
@@ -400,8 +399,8 @@ fi
|
||||
%{_datadir}/applications/*.desktop
|
||||
|
||||
# Icons
|
||||
%{_datadir}/icons/hicolor/scalable/apps/sunshine.svg
|
||||
%{_datadir}/icons/hicolor/scalable/status/sunshine*.svg
|
||||
%{_datadir}/icons/hicolor/scalable/apps/*.Sunshine.svg
|
||||
%{_datadir}/icons/hicolor/scalable/status/*.Sunshine-*.svg
|
||||
|
||||
# Metainfo
|
||||
%{_datadir}/metainfo/*.metainfo.xml
|
||||
|
||||
@@ -4,6 +4,7 @@ Categories=RemoteAccess;Network;
|
||||
Comment=@PROJECT_DESCRIPTION@
|
||||
Exec=/usr/bin/env systemctl start --u sunshine
|
||||
Icon=@SUNSHINE_DESKTOP_ICON@
|
||||
StartupWMClass=@PROJECT_FQDN@
|
||||
Keywords=gamestream;stream;moonlight;remote play;
|
||||
Name=@PROJECT_NAME@
|
||||
Type=Application
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
# User Service
|
||||
mkdir -p ~/.config/systemd/user
|
||||
cp "/app/share/sunshine/systemd/user/sunshine.service" "$HOME/.config/systemd/user/sunshine.service"
|
||||
cp "/app/share/sunshine/systemd/user/app-dev.lizardbyte.app.Sunshine.service" "$HOME/.config/systemd/user/app-dev.lizardbyte.app.Sunshine.service"
|
||||
echo "Sunshine User Service has been installed."
|
||||
echo "Use [systemctl --user enable sunshine] once to autostart Sunshine on login."
|
||||
echo "Use [systemctl --user enable app-dev.lizardbyte.app.Sunshine] once to autostart Sunshine on login."
|
||||
|
||||
# Load uhid (DS5 emulation)
|
||||
UHID=$(cat /app/share/sunshine/modules-load.d/60-sunshine.conf)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
# User Service
|
||||
systemctl --user stop sunshine
|
||||
rm "$HOME/.config/systemd/user/sunshine.service"
|
||||
systemctl --user stop app-dev.lizardbyte.app.Sunshine
|
||||
rm "$HOME/.config/systemd/user/app-dev.lizardbyte.app.Sunshine.service"
|
||||
systemctl --user daemon-reload
|
||||
echo "Sunshine User Service has been removed."
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Description=@PROJECT_DESCRIPTION@
|
||||
StartLimitIntervalSec=500
|
||||
StartLimitBurst=5
|
||||
Conflicts=sunshine-kms.service
|
||||
After=graphical-session.target xdg-desktop-autostart.target xdg-desktop-portal.service
|
||||
Conflicts=app-@PROJECT_FQDN@.service
|
||||
After=graphical-session.target xdg-desktop-autostart.target
|
||||
|
||||
[Service]
|
||||
# Avoid starting Sunshine before the desktop is fully initialized.
|
||||
@@ -12,7 +12,6 @@ ExecStartPre=/bin/sleep 5
|
||||
@SUNSHINE_SERVICE_STOP_COMMAND@
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
NoNewPrivileges=true
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
|
||||
Reference in New Issue
Block a user