From b286b1ef55f4a3a11545879b6c5bd0f06801271e Mon Sep 17 00:00:00 2001 From: Stefal Date: Mon, 23 Dec 2024 22:56:20 +0100 Subject: [PATCH] some services were not restarted after saving new settings in the main service --- CHANGELOG.md | 1 + web_app/server.py | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba43204..c1d781c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Changed - Faster Septentrio Mosaic-X5 detection ### Fixed + - Fix some services were not restarted after saving new settings in the main service. - Fix pystemd result request for timer services. #162 #445 - Increase free space for archiving Mosaic-X5 data. #369 - Various fixes #441 #443 diff --git a/web_app/server.py b/web_app/server.py index 6837fdb..6ed52d9 100755 --- a/web_app/server.py +++ b/web_app/server.py @@ -832,13 +832,16 @@ def restartServices(restart_services_list=None): if service["name"] == "main": #the main service should be stopped during at least 1 second to let rtkrcv stop too. #another solution would be to call rtk.stopbase() - service["unit"].stop() - time.sleep(1.5) - service["unit"].start() + #service["unit"].stop() + #time.sleep(1.5) + #service["unit"].start() + rtk.stopBase() + service["unit"].restart() else: service["unit"].restart() #refresh service status + time.sleep(1) getServicesStatus() @socketio.on("get services status", namespace="/test")