feat: reload when config apply

This commit is contained in:
2026-07-20 09:38:40 +08:00
parent ad49c3d2cb
commit 9adc8777c2
4 changed files with 6 additions and 7 deletions

View File

@ -383,7 +383,7 @@ func (m *Manager) GetServiceStatus(serviceName string) string {
// ReloadService reloads mihomo configuration via its external-controller API
// without restarting the service.
func (m *Manager) ReloadService(serviceName string) bool {
func (m *Manager) ReloadService() bool {
configPath := filepath.Join(m.CoreConfigManager.Storage.ConfigDir, "generated_config.yaml")
if _, err := os.Stat(configPath); err != nil {
fmt.Printf("❌ Configuration file not found: %s\n", configPath)