add: timer & reboot
This commit is contained in:
@@ -46,7 +46,7 @@ def set_shutdown(time, now):
|
||||
return
|
||||
LAST_VALUE = time
|
||||
print("[BS Shutdown] shutting down in " + str(time - now) + " seconds")
|
||||
subprocess.run(["shutdown", "-s", "-t", str(time - now)])
|
||||
subprocess.run(["shutdown", "-r", "-t", str(time - now)])
|
||||
|
||||
|
||||
def remove_shutdown():
|
||||
@@ -84,4 +84,4 @@ def update():
|
||||
if __name__ == '__main__':
|
||||
while True:
|
||||
update()
|
||||
time.sleep(30)
|
||||
time.sleep(1800)
|
||||
Reference in New Issue
Block a user