Skip to content

FEATURE: default value for -config #755

Open
@shish

Description

What version of nebula are you using?

master

What operating system are you using?

Mac

Describe the Bug

I want to email my friend a zip file with nebula.exe + config.yml + certs, and tell them "double-click nebula.exe to connect to my network"

service.go already contains code for "if config isn't specified, check to see if there's a config file next to the binary":

if *configPath == "" {
ex, err := os.Executable()
if err != nil {
panic(err)
}
*configPath = filepath.Dir(ex) + "/config.yaml"
}

Could this code be used in the other places, so we default to "check the current folder" instead of "exit with an error"?

Now that I write this out, I realise that I could also include a .bat file in the .zip which just runs ./nebula.exe -config config.yml, but I feel like "check the current folder" would be nicer, and service.go is doing that already, so really we'd just be making it consistent :)

Logs from affected hosts

No response

Config files from affected hosts

No response

Metadata

Assignees

No one assigned

    Labels

    NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions