aboutsummaryrefslogtreecommitdiff
path: root/cmd/server/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/server/main.go')
-rw-r--r--cmd/server/main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/server/main.go b/cmd/server/main.go
index 912cba0..ee8cf6f 100644
--- a/cmd/server/main.go
+++ b/cmd/server/main.go
@@ -28,6 +28,8 @@ func main() { //nolint:funlen
directory := fl.String("d", ".", "Directory to serve.")
version := fl.Bool("v", false, "Print the version then exit")
confFn := fl.String("c", "conf.yml", "Location for the config file")
+ authConfFn := fl.String("ac", "auth.json",
+ "Location for authorization configuration file")
verbose := fl.Bool("V", false, "Be more verbose ( dump config, etc ) ")
fl.StringVar(&page.TimeFormat, "T", page.TimeFormat,
"Set the page time format, be careful with this")
@@ -61,6 +63,11 @@ func main() { //nolint:funlen
app = &App{}
}
+ err = app.ReadAuth(*authConfFn)
+ if err != nil {
+ log.Println(err)
+ }
+
if app.ReIndexPath == "" || *indexPath != defaultIndexPath {
app.ReIndexPath = *indexPath
}