diff options
author | 2020-06-29 20:49:05 -0700 | |
---|---|---|
committer | 2020-06-29 21:01:37 -0700 | |
commit | d2f4ed93df5e1866c5389aa2a687a6bc3c944b1d (patch) | |
tree | 57c6ec5c869a271273b161ed5ce790ab29ec82fe /cli/create_admin.go | |
parent | 1d6b0491a75687553fa9c37b68cd5f71aa6fee6e (diff) | |
download | v2-d2f4ed93df5e1866c5389aa2a687a6bc3c944b1d.tar.gz v2-d2f4ed93df5e1866c5389aa2a687a6bc3c944b1d.tar.zst v2-d2f4ed93df5e1866c5389aa2a687a6bc3c944b1d.zip |
Add support for secret keys exposed as a file
Secret keys are often exposed as a file in containerized environments.
Diffstat (limited to 'cli/create_admin.go')
-rw-r--r-- | cli/create_admin.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/create_admin.go b/cli/create_admin.go index 35f0c4a5..8308c520 100644 --- a/cli/create_admin.go +++ b/cli/create_admin.go @@ -8,6 +8,7 @@ import ( "fmt" "os" + "miniflux.app/config" "miniflux.app/logger" "miniflux.app/model" "miniflux.app/storage" @@ -15,8 +16,8 @@ import ( func createAdmin(store *storage.Storage) { user := model.NewUser() - user.Username = os.Getenv("ADMIN_USERNAME") - user.Password = os.Getenv("ADMIN_PASSWORD") + user.Username = config.Opts.AdminUsername() + user.Password = config.Opts.AdminPassword() user.IsAdmin = true if user.Username == "" || user.Password == "" { |