mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-01-14 04:35:58 +02:00
Rcon port config
Rcon port taken from config file or generated if empty
This commit is contained in:
parent
8ff0cfa725
commit
e42108f089
@ -177,8 +177,11 @@ func (config *Config) loadServerConfig() {
|
||||
config.FactorioAdminFile = filepath.Join(config.FactorioConfigDir, config.FactorioAdminFile)
|
||||
}
|
||||
|
||||
// Set random port as rconPort
|
||||
config.FactorioRconPort = randomPort()
|
||||
if config.FactorioRconPort == 0 {
|
||||
config.FactorioRconPort = randomPort()
|
||||
log.Println("Rcon port is empty, generated new one:")
|
||||
log.Printf("Port number: %v", config.FactorioRconPort)
|
||||
}
|
||||
}
|
||||
|
||||
// Returns random port to use for rcon connection
|
||||
|
Loading…
Reference in New Issue
Block a user