summaryrefslogtreecommitdiff
path: root/backend/src/localplatformlinux.py
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2024-05-29 21:14:22 -0400
committerAAGaming <aagaming@riseup.net>2024-05-29 21:14:22 -0400
commit5053a52f32c161910d09e735ba5d7c52299d004e (patch)
tree117d22a1f148682272340c6363d8b38c592e338e /backend/src/localplatformlinux.py
parent5bfc53231d152eb7daef53e62fa09b546b768450 (diff)
downloaddecky-loader-4cca314b987e6bf1d510fd2d70dcae23afc90fba.tar.gz
decky-loader-4cca314b987e6bf1d510fd2d70dcae23afc90fba.zip
backport webhelper restart logic from websocketv2.12.3v2.12.2-pre1
Diffstat (limited to 'backend/src/localplatformlinux.py')
-rw-r--r--backend/src/localplatformlinux.py6
1 files changed, 6 insertions, 0 deletions
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")