mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-01-28 05:36:33 +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)
|
config.FactorioAdminFile = filepath.Join(config.FactorioConfigDir, config.FactorioAdminFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set random port as rconPort
|
if config.FactorioRconPort == 0 {
|
||||||
config.FactorioRconPort = randomPort()
|
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
|
// Returns random port to use for rcon connection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user