From 5053a52f32c161910d09e735ba5d7c52299d004e Mon Sep 17 00:00:00 2001 From: AAGaming Date: Wed, 29 May 2024 21:14:22 -0400 Subject: backport webhelper restart logic from websocket --- backend/src/localplatformlinux.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'backend/src/localplatformlinux.py') diff --git a/backend/src/localplatformlinux.py b/backend/src/localplatformlinux.py index 1f857f27..4557d93f 100644 --- a/backend/src/localplatformlinux.py +++ b/backend/src/localplatformlinux.py @@ -156,6 +156,12 @@ async def service_start(service_name : str) -> bool: res = run(cmd, stdout=PIPE, stderr=STDOUT) return res.returncode == 0 +async def restart_webhelper() -> bool: + logger.info("Restarting steamwebhelper") + # TODO move to pkill + res = run(["killall", "-s", "SIGTERM", "steamwebhelper"], stdout=DEVNULL, stderr=DEVNULL) + return res.returncode == 0 + def get_privileged_path() -> str: path = os.getenv("PRIVILEGED_PATH") -- cgit v1.2.3