From 57075c9cc016477b1fbc38a707c522c0493eef4c Mon Sep 17 00:00:00 2001 From: Claudio Costa Date: Mon, 6 Sep 2021 10:04:32 +0200 Subject: [PATCH] Fix stopping mattermost server (#18337) --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index df2a431eda..984f1cd35b 100644 --- a/Makefile +++ b/Makefile @@ -89,7 +89,7 @@ GO_VERSION_VALIDATION_ERR_MSG = Golang version is not supported, please update t # GOOS/GOARCH of the build host, used to determine whether we're cross-compiling or not BUILDER_GOOS_GOARCH="$(shell $(GO) env GOOS)_$(shell $(GO) env GOARCH)" -PLATFORM_FILES="./cmd/mattermost/main.go" +PLATFORM_FILES="./cmd/mattermost" # Output paths DIST_ROOT=dist @@ -511,11 +511,11 @@ ifeq ($(BUILDER_GOOS_GOARCH),"windows_amd64") wmic process where "Caption='go.exe' and CommandLine like '%go.exe run%'" call terminate wmic process where "Caption='mattermost.exe' and CommandLine like '%go-build%'" call terminate else - @for PID in $$(ps -ef | grep "[g]o run" | awk '{ print $$2 }'); do \ + @for PID in $$(ps -ef | grep "[g]o run" | grep "mattermost" | awk '{ print $$2 }'); do \ echo stopping go $$PID; \ kill $$PID; \ done - @for PID in $$(ps -ef | grep "[g]o-build" | awk '{ print $$2 }'); do \ + @for PID in $$(ps -ef | grep "[g]o-build" | grep "mattermost" | awk '{ print $$2 }'); do \ echo stopping mattermost $$PID; \ kill $$PID; \ done