Made the service into a daemon that you can route IPC commands to

This commit is contained in:
2026-06-05 17:12:24 -05:00
parent 073db62fb1
commit 70483037c9
5 changed files with 280 additions and 65 deletions

View File

@@ -16,8 +16,11 @@ type AppConfig struct {
} `json:"storage"`
Daemon struct {
UseNixOs bool `json:"use_nixos"`
// UseNixOs bool `json:"use_nixos"`
ListenAddress string `json:"listen_address"`
}
Instances map[string]VsServerConfigOptions `json:"instances"`
}
func DefaultConfig() *AppConfig {
@@ -30,6 +33,10 @@ func DefaultConfig() *AppConfig {
cfg.Storage.BackupDir = filepath.Join(basePath, "backups")
cfg.Storage.ConfigTemplatesDir = filepath.Join(basePath, "config_templates")
cfg.Daemon.ListenAddress = "127.0.0.1:12345"
cfg.Instances = make(map[string]VsServerConfigOptions)
return cfg
}