mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 23:00:58 +00:00
Set name of first node to the local hostname (fixes #121)
This commit is contained in:
parent
a98d75edaa
commit
f72ee7a69e
@ -126,6 +126,7 @@ func main() {
|
||||
|
||||
if len(cfg.Repositories) == 0 {
|
||||
infoln("No config file; starting with empty defaults")
|
||||
name, _ := os.Hostname()
|
||||
|
||||
cfg, err = readConfigXML(nil)
|
||||
cfg.Repositories = []RepositoryConfiguration{
|
||||
@ -136,7 +137,11 @@ func main() {
|
||||
},
|
||||
}
|
||||
cfg.Nodes = []NodeConfiguration{
|
||||
{NodeID: myID, Addresses: []string{"dynamic"}},
|
||||
{
|
||||
NodeID: myID,
|
||||
Addresses: []string{"dynamic"},
|
||||
Name: name,
|
||||
},
|
||||
}
|
||||
|
||||
saveConfig()
|
||||
|
Loading…
Reference in New Issue
Block a user