backport webhelper restart logic from websocket

This commit is contained in:
AAGaming
2024-05-29 21:14:22 -04:00
parent 5bfc53231d
commit 5053a52f32
2 changed files with 11 additions and 5 deletions
+6
View File
@@ -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")