Point to bootstrap password on restart before first login for PR #7140
This commit is contained in:
parent
1a2cb62094
commit
70e4821f36
1 changed files with 7 additions and 1 deletions
|
|
@ -570,7 +570,13 @@ async def lifespan(app: FastAPI):
|
|||
print(" open that file to read the password, then sign in and change it.")
|
||||
print("=" * 60 + "\n")
|
||||
else:
|
||||
app.state.bootstrap_password = storage.get_bootstrap_password()
|
||||
bootstrap_pw = storage.get_bootstrap_password()
|
||||
app.state.bootstrap_password = bootstrap_pw
|
||||
# A restart before first login skips the creation banner above; still
|
||||
# point the operator to the seed file while the bootstrap pw is unrotated.
|
||||
if bootstrap_pw:
|
||||
bootstrap_path = storage.DB_PATH.parent / ".bootstrap_password"
|
||||
print(f"\nAdmin password change still required. Read it from: {bootstrap_path}\n")
|
||||
|
||||
_lifespan_log.info(
|
||||
"lifespan startup completed in %.1fms",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue