mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-12-20 01:11:03 +08:00
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
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:
@@ -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:])
|
||||
|
||||
Reference in New Issue
Block a user