diff options
author | Benjamin Morrison <ben@gbmor.dev> | 2021-10-21 21:44:31 -0400 |
---|---|---|
committer | Benjamin Morrison <ben@gbmor.dev> | 2021-10-21 21:44:31 -0400 |
commit | f15ca06d4c054993c77a566540ef785757c20dea (patch) | |
tree | 7d6cc84b1b2119aff64bfc4ccad9b0ee0f66c3d4 /svc/conf.go | |
parent | 57dfee62f097eed8f5e4a3429d7ea850ce07c570 (diff) | |
download | getwtxt-f15ca06d4c054993c77a566540ef785757c20dea.tar.gz |
exit if admin password is empty
Diffstat (limited to 'svc/conf.go')
-rw-r--r-- | svc/conf.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svc/conf.go b/svc/conf.go index 5f826fb..c563efe 100644 --- a/svc/conf.go +++ b/svc/conf.go @@ -177,7 +177,7 @@ func bindConfig() { confObj.CacheInterval = viper.GetDuration("StatusFetchInterval") confObj.DBInterval = viper.GetDuration("DatabasePushInterval") txtPass := viper.GetString("AdminPassword") - if txtPass == "please_change_me" { + if txtPass == "please_change_me" || strings.TrimSpace(txtPass) == "" { fmt.Println("Please set AdminPassword in getwtxt.yml") os.Exit(1) } |