diff --git a/autp-updater.py b/autp-updater.py index 49275766260337a0b9c44e10422f30f944ca62e4..175ba5ab06b8c1170c981445cf663a16bea9e3c1 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 0000000000000000000000000000000000000000..67b2276b503eb4dc0a23ef6417384200e4c13baf --- /dev/null +++ b/update_hwinfo.sh @@ -0,0 +1 @@ +microk8s kubectl rollout restart deploy/hwinfo