Development

This commit is contained in:
Matthew Grotke 2026-06-07 23:49:42 -04:00
parent 64f83d683e
commit 1a473296b7
2 changed files with 96 additions and 0 deletions

View file

@ -174,5 +174,20 @@ def _seed_initial_account():
_seed_initial_account()
def _write_credentials_key():
key = settings.get_credentials_key()
if not key:
return
path = f'{config_utils.CONFIGS_DIR}/.credentials-key'
try:
fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
os.write(fd, key + b'\n')
os.close(fd)
except OSError as exc:
print(f'[main] WARNING: Could not write .credentials-key: {exc}', file=sys.stderr)
_write_credentials_key()
if __name__ == "__main__":
app.run(host="0.0.0.0", port=25327)