Ensure default ports are specified
This commit is contained in:
parent
f82673f2e3
commit
96f123bce1
1 changed files with 10 additions and 0 deletions
10
cli/setup.go
10
cli/setup.go
|
@ -112,6 +112,16 @@ func setup() {
|
||||||
// Ports
|
// Ports
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
// Specify default port
|
||||||
|
if opts.Port.Web == 0 {
|
||||||
|
opts.Port.Web = 8000
|
||||||
|
}
|
||||||
|
|
||||||
|
// Specify default port
|
||||||
|
if opts.Port.Tcp == 0 {
|
||||||
|
opts.Port.Tcp = 33693
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure port number is valid
|
// Ensure port number is valid
|
||||||
if opts.Port.Web < 0 || opts.Port.Web > 65535 {
|
if opts.Port.Web < 0 || opts.Port.Web > 65535 {
|
||||||
log.Fatal("Please specify a valid port number for --port-web")
|
log.Fatal("Please specify a valid port number for --port-web")
|
||||||
|
|
Loading…
Reference in a new issue