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

@ -155,7 +155,6 @@ func newServiceRestartCmd() *cobra.Command {
}
func newServiceReloadCmd() *cobra.Command {
var name string
c := &cobra.Command{
Use: "reload",
Short: "Reload mihomo service configuration (via API)",
@ -165,13 +164,12 @@ func newServiceReloadCmd() *cobra.Command {
if err != nil {
return err
}
if !m.Core.ReloadService(name) {
if !m.Core.ReloadService() {
return errSilentFailure
}
return nil
},
}
withNameFlag(c, &name)
return c
}