From f47865be1027cd2eb1bb4aab9ecc7317952b1d4e Mon Sep 17 00:00:00 2001
From: Eunhak Lee <lee@enak.kr>
Date: Sun, 8 Dec 2024 19:47:17 +0900
Subject: [PATCH] =?UTF-8?q?feat:=20hwinfo-daemon=20=EC=9E=AC=EC=8B=9C?=
 =?UTF-8?q?=EC=9E=91=20=EC=A7=80=EC=9B=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 autp-updater.py  | 7 +++++++
 update_hwinfo.sh | 1 +
 2 files changed, 8 insertions(+)
 create mode 100755 update_hwinfo.sh

diff --git a/autp-updater.py b/autp-updater.py
index 4927576..175ba5a 100644
--- a/autp-updater.py
+++ b/autp-updater.py
@@ -17,3 +17,10 @@ def be():
     output = output.decode()
     return output
 
+@app.route("/hwinfo")
+def be():
+    print("Restarting hwinfo-daemon")
+    output = subprocess.check_output(["bash", "-c", "./update_hwinfo.sh"], stderr=subprocess.STDOUT)
+    output = output.decode()
+    return output
+
diff --git a/update_hwinfo.sh b/update_hwinfo.sh
new file mode 100755
index 0000000..67b2276
--- /dev/null
+++ b/update_hwinfo.sh
@@ -0,0 +1 @@
+microk8s kubectl rollout restart deploy/hwinfo
-- 
GitLab