Skip to content

fix: check existing admin user on container start#379

Open
alexandrovas wants to merge 1 commit into
immauss:masterfrom
alexandrovas:fix-second-start
Open

fix: check existing admin user on container start#379
alexandrovas wants to merge 1 commit into
immauss:masterfrom
alexandrovas:fix-second-start

Conversation

@alexandrovas

Copy link
Copy Markdown

On second and subsequent container starts user already exists in database. We must check for the existence of the user, otherwise the create command will exit with a non-zero code:

root@6cbfbe92ad1f:/# su -c "gvmd --role=\"Super Admin\" --create-user=\"$USERNAME\" --password=\"$PASSWORD\"" gvm
User exists already.
root@6cbfbe92ad1f:/# echo $?
1

Same check needed for delete default admin user.

Signed-off-by: Aleksandr Aleksandrov <alex.mirenki@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant