feat: remove config option from server

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
This commit is contained in:
Meenal Trivedi 2021-07-18 19:54:05 +05:30
parent b954343d73
commit 8fec5a9991
5 changed files with 29 additions and 8 deletions

View file

@ -0,0 +1,27 @@
{
"Peers": [],
"InterfacePeers": {},
"Listen": [],
"AdminListen": "none",
"MulticastInterfaces": [
{
"Regex": "en.*",
"Beacon": true,
"Listen": true,
"Port": 0
},
{
"Regex": "bridge.*",
"Beacon": true,
"Listen": true,
"Port": 0
}
],
"AllowedPublicKeys": [],
"PublicKey": "66c6d7f5eba330c1b200c2a879d527a81603b60f8e1f1d0b100351cebff6d485",
"PrivateKey": "31e0024b6217ff756be8e3d218652ac4c07ddad2aba3d00d0fa395a7f561237d66c6d7f5eba330c1b200c2a879d527a81603b60f8e1f1d0b100351cebff6d485",
"IfName": "auto",
"IfMTU": 65535,
"NodeInfoPrivacy": false,
"NodeInfo": null
}

Binary file not shown.

2
go.mod
View file

@ -1,7 +1,7 @@
module github.com/matrix-org/dendrite
require (
github.com/Arceliar/ironwood v0.0.0-20210619124114-6ad55cae5031 // indirect
github.com/Arceliar/ironwood v0.0.0-20210619124114-6ad55cae5031
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/HdrHistogram/hdrhistogram-go v1.0.1 // indirect
github.com/Masterminds/semver/v3 v3.1.1

1
go.sum
View file

@ -1185,7 +1185,6 @@ github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uY
github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
github.com/neilalexander/utp v0.1.1-0.20210622132614-ee9a34a30488 h1:xZk82i6JK2d0SqRIXwaxj7J/NQB6ngq0PuMx3wXBaRQ=
github.com/neilalexander/utp v0.1.1-0.20210622132614-ee9a34a30488/go.mod h1:NPHGhPc0/wudcaCqL/H5AOddkRf8GPRhzOujuUKGQu8=
github.com/neilalexander/utp v0.1.1-0.20210705212447-691f29ad692b h1:XNm+Ks3bVziRJxcMaIbzumWEw7l52z9Rek6cMHgln1g=
github.com/neilalexander/utp v0.1.1-0.20210705212447-691f29ad692b/go.mod h1:ylsx0342RjGHjOoVKhR/wz/7Lhiusonihfj4QLxEMcU=

View file

@ -25,7 +25,6 @@ import (
)
var (
configPath = flag.String("config", "dendrite.yaml", "The path to the config file. For more information, see the config file in this repository.")
version = flag.Bool("version", false, "Shows the current version and exits immediately.")
)
@ -38,11 +37,7 @@ func ParseFlags(monolith bool) *config.Dendrite {
os.Exit(0)
}
if *configPath == "" {
logrus.Fatal("--config must be supplied")
}
cfg, err := config.Load(*configPath, monolith)
cfg, err := config.Load("dendrite.yaml", monolith)
if err != nil {
logrus.Fatalf("Invalid config file: %s", err)