home: imp allocs
Some checks failed
build / test (macOS-latest) (push) Has been cancelled
build / test (ubuntu-latest) (push) Has been cancelled
build / test (windows-latest) (push) Has been cancelled
build / build-release (push) Has been cancelled
build / notify (push) Has been cancelled
lint / go-lint (push) Has been cancelled
lint / eslint (push) Has been cancelled
lint / notify (push) Has been cancelled

This commit is contained in:
f.setrakov
2025-10-22 14:35:12 +03:00
parent dbe768ec96
commit f148198fe0

View File

@@ -257,13 +257,7 @@ func finalizeWindowsUpdate(ctx context.Context,
execPath string,
runningAsService bool,
) {
commandConf := &executil.CommandConfig{
Path: execPath,
Args: os.Args[1:],
Stdin: os.Stdin,
Stdout: os.Stdout,
Stderr: os.Stderr,
}
var commandConf *executil.CommandConfig
if runningAsService {
// NOTE: We can't restart the service via "kardianos/service"
@@ -275,6 +269,14 @@ func finalizeWindowsUpdate(ctx context.Context,
Path: "cmd",
Args: []string{"/c", "net stop AdGuardHome & net start AdGuardHome"},
}
} else {
commandConf = &executil.CommandConfig{
Path: execPath,
Args: os.Args[1:],
Stdin: os.Stdin,
Stdout: os.Stdout,
Stderr: os.Stderr,
}
}
l.InfoContext(ctx, "restarting", "exec_path", execPath, "args", os.Args[1:])