Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit f025890

Browse files
committed
adjust some cmdline arg, accepts more env variables
1 parent 5aa6e03 commit f025890

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

server/server.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@ var (
4545
type Server struct {
4646
//config
4747
Title string `opts:"help=Title of this instance,env=TITLE"`
48-
Port int `opts:"help=Listening port(depreciated. use --listen),env=PORT"`
49-
Host string `opts:"help=Listening interface (depreciated. use --listen),env=HOST"`
48+
Port int `opts:"help=Depreciated. use --listen. Listening port(),env=PORT"`
49+
Host string `opts:"help=Depreciated. use --listen. Listening interface,env=HOST"`
5050
Listen string `opts:"help=Listening Address:Port or unix socket (default all),env=LISTEN"`
5151
UnixPerm string `opts:"help=DomainSocket file permission (default 0666),env=UNIXPERM"`
5252
Auth string `opts:"help=Optional basic auth in form 'user:password',env=AUTH"`
5353
ProxyURL string `opts:"help=Proxy url,env=PROXY_URL"`
54-
ConfigPath string `opts:"help=Configuration file path (default ./cloud-torrent.yaml)"`
54+
ConfigPath string `opts:"help=Configuration file path (default ./cloud-torrent.yaml),short=c,env=CONFIGPATH"`
5555
KeyPath string `opts:"help=TLS Key file path"`
5656
CertPath string `opts:"help=TLS Certicate file path,short=r"`
5757
RestAPI string `opts:"help=Listen on a trusted port accepts /api/ requests (eg. localhost:3001),env=RESTAPI"`
58-
Log bool `opts:"help=Enable request logging"`
58+
ReqLog bool `opts:"help=Enable request logging,env=REQLOG"`
5959
Open bool `opts:"help=Open now with your default browser"`
60-
DisableLogTime bool `opts:"help=Don't print timestamp in log"`
61-
Debug bool `opts:"help=Debug app"`
62-
DebugTorrent bool `opts:"help=Debug torrent engine"`
60+
DisableLogTime bool `opts:"help=Don't print timestamp in log,env=DISABLELOGTIME"`
61+
Debug bool `opts:"help=Debug app,env=DEBUG"`
62+
DebugTorrent bool `opts:"help=Debug torrent engine,env=DEBUGTORRENT"`
6363
ConvYAML bool `opts:"help=Convert old json config to yaml format."`
6464

6565
//http handlers
@@ -248,7 +248,7 @@ func (s *Server) Run(version string) error {
248248
h = cookieauth.New().SetUserPass(user, pass).Wrap(h)
249249
log.Printf("Enabled HTTP authentication")
250250
}
251-
if s.Log {
251+
if s.ReqLog {
252252
h = requestlog.Wrap(h)
253253
}
254254

0 commit comments

Comments
 (0)