From 0d69fcc29655452ef3bb3d078e21085918c6a3b5 Mon Sep 17 00:00:00 2001 From: Namonay Date: Wed, 25 Feb 2026 11:20:20 +0000 Subject: [PATCH] a --- client/bs_shutdown.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/bs_shutdown.py b/client/bs_shutdown.py index 6cb782c..db69098 100644 --- a/client/bs_shutdown.py +++ b/client/bs_shutdown.py @@ -47,16 +47,19 @@ def update(): if data is not None and data["noshutdown"] == 1: exit now = to_seconds(datetime.now().time()) + if (time - now) < 0: exit + + if (time == LAST_VALUE): + print("Nothing changed") + return + if (time != LAST_VALUE): if (LAST_VALUE != 0): subprocess.run(["shutdown", "/a"]) print("new val detected") LAST_VALUE = time - if (time == LAST_VALUE): - print("Nothing changed") - return print("shutting down in " + str(time - now) + " seconds") # subprocess.run(["shutdown", "/s", "/t", (time - now), " "]) print(time - now)