From d3e75831b5ba3e0e63c0450c18eb8d6147b67633 Mon Sep 17 00:00:00 2001 From: LKuemmel Date: Tue, 16 Apr 2024 09:52:25 +0200 Subject: [PATCH] fix resetting backup_before_update at reboot, fix show update in progess message --- packages/helpermodules/command.py | 2 ++ packages/helpermodules/update_config.py | 2 +- runs/update_self.sh | 3 --- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/helpermodules/command.py b/packages/helpermodules/command.py index 9d9b6104b0..ccf78c8785 100644 --- a/packages/helpermodules/command.py +++ b/packages/helpermodules/command.py @@ -630,6 +630,8 @@ def systemShutdown(self, connection_id: str, payload: dict) -> None: def systemUpdate(self, connection_id: str, payload: dict) -> None: log.info("Update requested") + # notify system about running update, notify abput end update in script + Pub().pub("openWB/system/update_in_progress", True) if SubData.system_data["system"].data["backup_before_update"]: self.createCloudBackup(connection_id, {}) parent_file = Path(__file__).resolve().parents[2] diff --git a/packages/helpermodules/update_config.py b/packages/helpermodules/update_config.py index bb3ea046aa..07ed97fc2a 100644 --- a/packages/helpermodules/update_config.py +++ b/packages/helpermodules/update_config.py @@ -365,7 +365,7 @@ class UpdateConfig: "^openWB/system/backup_cloud/config$", "^openWB/system/boot_done$", "^openWB/system/configurable/backup_clouds$", - "^openWB/system/backup_cloud/backup_before_update$" + "^openWB/system/backup_cloud/backup_before_update$", "^openWB/system/configurable/chargepoints$", "^openWB/system/configurable/chargepoints_internal$", "^openWB/system/configurable/devices_components$", diff --git a/runs/update_self.sh b/runs/update_self.sh index 1edece644c..65d12e6f13 100755 --- a/runs/update_self.sh +++ b/runs/update_self.sh @@ -10,9 +10,6 @@ SELECTEDTAG=$2 echo "#### running update ####" >"$LOGFILE" { - # notify system about running update - mosquitto_pub -p 1886 -t "openWB/system/update_in_progress" -r -m 'true' - # fetch new release from GitHub echo "#### 1. fetching latest data from '$GITREMOTE' ####" git -C "$OPENWBBASEDIR" fetch -v "$GITREMOTE" && echo "#### done"