mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-01-24 05:17:24 +02:00
moved server-settings.json config file to config directory
This commit is contained in:
parent
64921908ca
commit
dfe08853e4
@ -49,7 +49,7 @@ type FactorioServerSettings struct {
|
||||
|
||||
func initFactorio() *FactorioServer {
|
||||
f := FactorioServer{}
|
||||
settingsFile := filepath.Join(config.FactorioDir, config.SettingsFile)
|
||||
settingsFile := filepath.Join(config.FactorioConfigDir, config.SettingsFile)
|
||||
|
||||
if _, err := os.Stat(settingsFile); err == nil {
|
||||
// server-settings.json file exists
|
||||
|
@ -16,6 +16,7 @@ type Config struct {
|
||||
FactorioSavesDir string `json:"saves_dir"`
|
||||
FactorioModsDir string `json:"mods_dir"`
|
||||
FactorioConfigFile string `json:"config_file"`
|
||||
FactorioConfigDir string `json:"config_directory"`
|
||||
FactorioLog string `json:"logfile"`
|
||||
FactorioBinary string `json:"factorio_binary"`
|
||||
ServerIP string `json:"server_ip"`
|
||||
@ -70,6 +71,7 @@ func parseFlags() {
|
||||
config.ServerPort = *factorioPort
|
||||
config.FactorioSavesDir = filepath.Join(config.FactorioDir, "saves")
|
||||
config.FactorioModsDir = filepath.Join(config.FactorioDir, "mods")
|
||||
config.FactorioConfigDir = filepath.Join(config.FactorioDir, "config")
|
||||
config.FactorioConfigFile = filepath.Join(config.FactorioDir, *factorioConfigFile)
|
||||
config.FactorioBinary = filepath.Join(config.FactorioDir, *factorioBinary)
|
||||
config.MaxUploadSize = *factorioMaxUpload
|
||||
|
Loading…
x
Reference in New Issue
Block a user