diff --git a/Makefile b/Makefile index 510aa0b37c..2dc873582c 100644 --- a/Makefile +++ b/Makefile @@ -361,11 +361,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 "disableconfigwatch" | 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 "disableconfigwatch" | awk '{ print $$2 }'); do \ echo stopping mattermost $$PID; \ kill $$PID; \ done diff --git a/cmd/mattermost/commands/server.go b/cmd/mattermost/commands/server.go index e80313dcb0..b705671f4a 100644 --- a/cmd/mattermost/commands/server.go +++ b/cmd/mattermost/commands/server.go @@ -91,7 +91,7 @@ func runServer(configStore config.Store, disableConfigWatch bool, usedPlatform b // wait for kill signal before attempting to gracefully shutdown // the running service - signal.Notify(interruptChan, os.Interrupt, syscall.SIGINT, syscall.SIGTERM) + signal.Notify(interruptChan, os.Interrupt, syscall.SIGINT, syscall.SIGTERM, syscall.SIGPIPE) <-interruptChan return nil