Prevent pi reboot due to timing issue after applying admin panel changes. Closes #8
This commit is contained in:
parent
4c25aeabf9
commit
e83914a661
1 changed files with 2 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ def set_root_password(new_pass):
|
||||||
print(unlock_result)
|
print(unlock_result)
|
||||||
return False
|
return False
|
||||||
else:
|
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:
|
if result.returncode != 0:
|
||||||
print(f"Issue setting password for root account")
|
print(f"Issue setting password for root account")
|
||||||
print(result)
|
print(result)
|
||||||
|
|
@ -216,6 +216,7 @@ def check_settings(raspap_installed: bool):
|
||||||
needs_restart = set_root_password(load_setting('root_password')) or needs_restart
|
needs_restart = set_root_password(load_setting('root_password')) or needs_restart
|
||||||
if needs_restart:
|
if needs_restart:
|
||||||
print("I am restarting here")
|
print("I am restarting here")
|
||||||
|
time.sleep(60)
|
||||||
run(["sudo", "reboot"])
|
run(["sudo", "reboot"])
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue