1
0
Fork 0
forked from External/ergo

allow overriding services hostname

Fixes #1407
This commit is contained in:
Shivaram Lingamneni 2020-11-28 23:40:21 -05:00
parent 9214d978d0
commit 3ee6fd1f6c
5 changed files with 41 additions and 13 deletions

View file

@ -530,6 +530,8 @@ func (server *Server) applyConfig(config *Config) (err error) {
} else if oldConfig.Server.IPCheckScript.MaxConcurrency != config.Server.IPCheckScript.MaxConcurrency ||
oldConfig.Accounts.AuthScript.MaxConcurrency != config.Accounts.AuthScript.MaxConcurrency {
return fmt.Errorf("Cannot change max-concurrency for scripts after launching the server, rehash aborted")
} else if oldConfig.Server.OverrideServicesHostname != config.Server.OverrideServicesHostname {
return fmt.Errorf("Cannot change override-services-hostname after launching the server, rehash aborted")
}
}
@ -563,6 +565,10 @@ func (server *Server) applyConfig(config *Config) (err error) {
if maxAuthConc != 0 {
server.semaphores.AuthScript.Initialize(maxAuthConc)
}
if err := overrideServicePrefixes(config.Server.OverrideServicesHostname); err != nil {
return err
}
}
if oldConfig != nil {