diff --git a/libbeat/cmd/instance/beat_reexec_windows.go b/libbeat/cmd/instance/beat_reexec_other.go similarity index 87% rename from libbeat/cmd/instance/beat_reexec_windows.go rename to libbeat/cmd/instance/beat_reexec_other.go index 429bb665e8b..ceb5b202b44 100644 --- a/libbeat/cmd/instance/beat_reexec_windows.go +++ b/libbeat/cmd/instance/beat_reexec_other.go @@ -15,17 +15,19 @@ // specific language governing permissions and limitations // under the License. -//go:build windows +//go:build !unix package instance import ( + "runtime" + "github.com/elastic/elastic-agent-libs/logp" ) // doReexec is a noop on Windows, it only logs a message explaining it. func (b *Beat) doReexec() error { logger := logp.L().Named("ssl.cert.reloader") - logger.Info("reloading certs/reexecing is not supported on Windows. %s will not restart", b.Info.Beat) + logger.Info("reloading certs/reexecing is not supported on %s. %s will not restart", runtime.GOOS, b.Info.Beat) return nil } diff --git a/libbeat/cmd/instance/beat_reexec_unix.go b/libbeat/cmd/instance/beat_reexec_unix.go index 801fabe3f67..c16be82970f 100644 --- a/libbeat/cmd/instance/beat_reexec_unix.go +++ b/libbeat/cmd/instance/beat_reexec_unix.go @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -//go:build !windows +//go:build unix package instance