From 888eb9f6ad5fe165f11675874976318c6568c4b7 Mon Sep 17 00:00:00 2001 From: ndrsnhs Date: Fri, 28 Feb 2025 11:26:47 +0100 Subject: [PATCH] update via shell --- runs/update_secondary.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 runs/update_secondary.py diff --git a/runs/update_secondary.py b/runs/update_secondary.py new file mode 100644 index 0000000000..2c66e44af9 --- /dev/null +++ b/runs/update_secondary.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +import sys +sys.path.append("/var/www/html/openWB/packages") +try: + from helpermodules import pub +except Exception as e: + # Durch try-except werden die Imports vom Formatierer nicht an den Dateianfang geschoben. + print(e) + +secondary_ip = sys.argv[1] +print("IP der Secondary: "+secondary_ip) + +pub.pub_single("openWB/set/command/primary/todo", + {"command": "systemUpdate", "data": {}}, + hostname=secondary_ip) + +print("Update Befehl an Secondary gesendet.")