Add option to disable Web-UI

This commit is contained in:
Sammy Libre 2016-12-07 11:47:15 +05:00
parent a4249cdb0d
commit c1a78f5d3d
3 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,7 @@
}, },
"frontend": { "frontend": {
"enabled": true,
"listen": "0.0.0.0:8082", "listen": "0.0.0.0:8082",
"login": "admin", "login": "admin",
"password": "", "password": "",

View File

@ -39,6 +39,7 @@ type Upstream struct {
} }
type Frontend struct { type Frontend struct {
Enabled bool `json:"enabled"`
Listen string `json:"listen"` Listen string `json:"listen"`
Login string `json:"login"` Login string `json:"login"`
Password string `json:"password"` Password string `json:"password"`

View File

@ -31,7 +31,9 @@ func startStratum() {
} }
s := stratum.NewStratum(&cfg) s := stratum.NewStratum(&cfg)
go startFrontend(&cfg, s) if cfg.Frontend.Enabled {
startFrontend(&cfg, s)
}
s.Listen() s.Listen()
} }