56dbe7738d
Commit 3cf89633e9
is changed how the cobra subcommands are created for storagenode (with prefering local variables instead of package level variables).
However, there is a bug which makes it impossible to restart Storagenode services on Windows: the refactored code creates the rootCmd/runCmd twice: therefore the ctx of the running process is not exactly the same as the ctx which supposed to be stopped / cancelled.
This patch fixes this problem with re-using exising, initialized command instead of creating a new one for cancellation.
Fixes: https://github.com/storj/storj/issues/5845
Change-Id: Ib8a4b80d4574e448f65c8558e927c0908c9c5eed
14 lines
226 B
Go
14 lines
226 B
Go
// Copyright (C) 2021 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
//go:build !windows
|
|
// +build !windows
|
|
|
|
package main
|
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
func startAsService(*cobra.Command) bool {
|
|
return false
|
|
}
|