Fixed IPC calls in main to use new ip and port seperation in the config
This commit is contained in:
@@ -18,23 +18,23 @@ type AppConfig struct {
|
||||
|
||||
Daemon struct {
|
||||
ListenAddress string `json:"listen_address"`
|
||||
Port int `json:"port"`
|
||||
} `json:"daemon"`
|
||||
|
||||
Instances map[string]InstanceMetadata `json:"instances"`
|
||||
}
|
||||
|
||||
func CreateConfigWithDefaults(configPath string) *AppConfig {
|
||||
home, _ := os.UserHomeDir()
|
||||
basePath := filepath.Join(home, ".local", "share", "vssm")
|
||||
basePath := filepath.Join(filepath.Dir(configPath), "vssm_data")
|
||||
|
||||
cfg := &AppConfig{}
|
||||
cfg.Storage.AppDataDir = basePath
|
||||
cfg.Storage.InstallDir = filepath.Join(basePath, "installs")
|
||||
cfg.Storage.InstancesDir = filepath.Join(basePath, "instances")
|
||||
cfg.Storage.BackupDir = filepath.Join(basePath, "backups")
|
||||
cfg.Storage.ConfigTemplatesDir = filepath.Join(basePath, "config_templates")
|
||||
|
||||
cfg.Daemon.ListenAddress = "127.0.0.1:12345"
|
||||
cfg.Daemon.ListenAddress = "127.0.0.1"
|
||||
cfg.Daemon.Port = 65000
|
||||
|
||||
cfg.Instances = make(map[string]InstanceMetadata)
|
||||
|
||||
@@ -70,7 +70,6 @@ func LoadOrCreateConfig(configPath string) (*AppConfig, error) {
|
||||
}
|
||||
|
||||
dirs := []string{
|
||||
cfg.Storage.AppDataDir,
|
||||
cfg.Storage.InstallDir,
|
||||
cfg.Storage.InstancesDir,
|
||||
cfg.Storage.BackupDir,
|
||||
|
||||
Reference in New Issue
Block a user