You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by dr...@apache.org on 2018/09/04 23:58:41 UTC
[incubator-openwhisk-devtools] branch master updated: list all
ports that are occupied in check-required-ports (#153)
This is an automated email from the ASF dual-hosted git repository.
dragos pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-devtools.git
The following commit(s) were added to refs/heads/master by this push:
new 4de2892 list all ports that are occupied in check-required-ports (#153)
4de2892 is described below
commit 4de289206cb0f7b19b69f0f172fbc2fd71ea47cf
Author: Justin Halsall <Ju...@users.noreply.github.com>
AuthorDate: Tue Sep 4 19:58:38 2018 -0400
list all ports that are occupied in check-required-ports (#153)
---
docker-compose/Makefile | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/docker-compose/Makefile b/docker-compose/Makefile
index ac4807d..2764e5a 100644
--- a/docker-compose/Makefile
+++ b/docker-compose/Makefile
@@ -131,11 +131,17 @@ print-host:
.PHONY: check-required-ports
check-required-ports:
echo "checking required ports ... "
+ @occupiedports=0; \
for port in 2888 5984 8085 8888 9092 8001; do \
pid=`lsof -Pi :$$port -sTCP:LISTEN -t` ; \
- if [ ! -z "$$pid" ]; then echo "$$(tput setaf 1)Port $$port is taken by PID:$$pid.$$(tput sgr0)"; exit 1; fi; \
- done
- echo " ... OK"
+ if [ ! -z "$$pid" ]; then let "occupiedports+=1" ; echo "$$(tput setaf 1)Port $$port is taken by PID:$$pid.$$(tput sgr0)"; fi; \
+ done; \
+ if [ "$$occupiedports" = 0 ]; then \
+ echo " ... OK"; \
+ else \
+ echo "$$(tput setaf 2)Ports occupied. To stop openwhisk use: $$(tput setaf 4)make destroy$$(tput setaf 2) or: $$(tput setaf 4)make stop$$(tput sgr0)"; \
+ exit 1; \
+ fi
.PHONY: check-alarm-ports
check-alarm-ports: