From e83914a661bcf9a080ce0b08ebed6a17c7e57d7f Mon Sep 17 00:00:00 2001 From: Ana Custura Date: Mon, 30 Mar 2026 10:29:25 +0100 Subject: [PATCH] Prevent pi reboot due to timing issue after applying admin panel changes. Closes #8 --- change_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/change_manager.py b/change_manager.py index 14f0d4b..7864fa6 100644 --- a/change_manager.py +++ b/change_manager.py @@ -42,7 +42,7 @@ def set_root_password(new_pass): print(unlock_result) return False else: - result = run(["passwd", "-s", "root"],capture_output = True, text = True, input=new_pass) + result = run(["passwd", "-s", "root"], capture_output = True, text = True, input=new_pass) if result.returncode != 0: print(f"Issue setting password for root account") print(result) @@ -216,6 +216,7 @@ def check_settings(raspap_installed: bool): needs_restart = set_root_password(load_setting('root_password')) or needs_restart if needs_restart: print("I am restarting here") + time.sleep(60) run(["sudo", "reboot"]) if __name__ == "__main__":