mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
added httpaddress and wwwroot command line check and do not overwrite if it's empty
This commit is contained in:
parent
6f8a9da19f
commit
fde986fa0e
1 changed files with 10 additions and 6 deletions
|
@ -294,8 +294,12 @@ func run(args yggArgs, ctx context.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//override httpaddress and wwwroot parameters in cfg
|
//override httpaddress and wwwroot parameters in cfg
|
||||||
cfg.HttpAddress = args.httpaddress
|
if len(args.httpaddress) > 0 {
|
||||||
cfg.WwwRoot = args.wwwroot
|
cfg.HttpAddress = args.httpaddress
|
||||||
|
}
|
||||||
|
if len(args.wwwroot) > 0 {
|
||||||
|
cfg.WwwRoot = args.wwwroot
|
||||||
|
}
|
||||||
|
|
||||||
// Setup the RiV-mesh node itself.
|
// Setup the RiV-mesh node itself.
|
||||||
{
|
{
|
||||||
|
@ -349,10 +353,10 @@ func run(args yggArgs, ctx context.Context) {
|
||||||
options := []multicast.SetupOption{}
|
options := []multicast.SetupOption{}
|
||||||
for _, intf := range cfg.MulticastInterfaces {
|
for _, intf := range cfg.MulticastInterfaces {
|
||||||
options = append(options, multicast.MulticastInterface{
|
options = append(options, multicast.MulticastInterface{
|
||||||
Regex: regexp.MustCompile(intf.Regex),
|
Regex: regexp.MustCompile(intf.Regex),
|
||||||
Beacon: intf.Beacon,
|
Beacon: intf.Beacon,
|
||||||
Listen: intf.Listen,
|
Listen: intf.Listen,
|
||||||
Port: intf.Port,
|
Port: intf.Port,
|
||||||
Priority: uint8(intf.Priority),
|
Priority: uint8(intf.Priority),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue