From d33e3a2882f51d120314f6a262e049225dad2f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D0=B0=D0=B4=D0=B8=D0=BD=20=D0=94?= =?UTF-8?q?=D0=B0=D0=BC=D1=8F=D0=BD=D0=BE=D0=B2?= Date: Thu, 26 Jan 2023 16:10:13 +0200 Subject: [PATCH] Restart the systemd service in case of a crash (#830) --- docs/source/about/usage.rst | 4 ++++ sunshine.service.in | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/source/about/usage.rst b/docs/source/about/usage.rst index e48aa1fc..7861e523 100644 --- a/docs/source/about/usage.rst +++ b/docs/source/about/usage.rst @@ -87,9 +87,13 @@ Sunshine needs access to `uinput` to create mouse and gamepad events. [Unit] Description=Sunshine self-hosted game stream host for Moonlight. + StartLimitIntervalSec=500 + StartLimitBurst=5 [Service] ExecStart= + Restart=on-failure + RestartSec=5s #Flatpak Only #ExecStop=flatpak kill dev.lizardbyte.sunshine diff --git a/sunshine.service.in b/sunshine.service.in index 157b3a4d..965b7871 100644 --- a/sunshine.service.in +++ b/sunshine.service.in @@ -1,8 +1,12 @@ [Unit] Description=@PROJECT_DESCRIPTION@ +StartLimitIntervalSec=500 +StartLimitBurst=5 [Service] ExecStart=@SUNSHINE_EXECUTABLE_PATH@ +Restart=on-failure +RestartSec=5s [Install] WantedBy=graphical-session.target