refactor(watchdog): remove tcp socket connection and add local unix sock connection
This commit is contained in:
@@ -65,7 +65,6 @@ func LoadConfig(configPath string, getInitSystem func() string) error {
|
||||
global.CurrentConfig.InstancePath = fileConfig.InstancePath
|
||||
global.CurrentConfig.Debug = fileConfig.Debug
|
||||
global.CurrentConfig.Watchdog.Enabled = fileConfig.Watchdog.Enabled
|
||||
global.CurrentConfig.Watchdog.Port = fileConfig.Watchdog.Port
|
||||
global.CurrentConfig.Notification.Enabled = fileConfig.Notification.Enabled
|
||||
global.CurrentConfig.Notification.Method = fileConfig.Notification.Method
|
||||
global.CurrentConfig.Webhook.Method = fileConfig.Webhook.Method
|
||||
@@ -93,10 +92,6 @@ func LoadConfig(configPath string, getInitSystem func() string) error {
|
||||
global.CurrentConfig.InstancePath = "./configs"
|
||||
}
|
||||
|
||||
if fileConfig.Watchdog.Port == 0 {
|
||||
global.CurrentConfig.Watchdog.Port = 12380
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(global.CurrentConfig.InstancePath, 0755); err != nil {
|
||||
return fmt.Errorf("failed to create config directory: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user