mirror of
https://github.com/sol1/rustguac.git
synced 2026-10-24 12:42:23 +00:00
bdcf58dd1c
The entrypoint created the docker-admin key whenever no file existed at /opt/rustguac/data/rustguac.db. With db_path set anywhere else, for example on a Kubernetes persistent volume, that file never exists, so every container start tried to create the admin again and failed with "UNIQUE constraint failed: admins.name". add-admin gains --if-none: create the admin only when no admin account exists, otherwise say so and exit successfully. rustguac opens the database db_path names, so the entrypoint no longer needs to know where it is. Any existing admin counts, so a docker-admin an operator removed after creating their own does not come back. The save-the-key banner is printed only when a key was actually created. Reported by @hit-rich.