From 5c408f8ce4647bdce617a090717be424eba07cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 24 Aug 2021 15:13:10 +0200 Subject: [PATCH] compose/systemd: fix completion of make targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Something goes wrong when parsing and GRN definition is treated as target. Signed-off-by: Jakub SokoĊ‚owski --- _assets/compose/bootnode/Makefile | 16 ++++++++++++---- _assets/compose/mailserver/Makefile | 6 +++--- _assets/systemd/bootnode/Makefile | 10 +++++----- _assets/systemd/mailserver/Makefile | 3 +-- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/_assets/compose/bootnode/Makefile b/_assets/compose/bootnode/Makefile index 4e5422050..0a5767006 100644 --- a/_assets/compose/bootnode/Makefile +++ b/_assets/compose/bootnode/Makefile @@ -19,16 +19,20 @@ export LOG_LEVEL ?= 3 export LISTEN_PORT ?= 30301 export API_MODULES ?= eth,web3,admin +NODE_ADDR = $(shell cat keys/nodeaddr) +ENODE_ADDR = enode://$(NODE_ADDR)@$(PUBLIC_IP):$(LISTEN_PORT) + define INFO_MSG * $(GRN)Your bootnode is listening on:$(RST) $(BLD)$(PUBLIC_IP):$(LISTEN_PORT)$(RST) + * $(GRN)Your enode address is:$(RST) +$(ENODE_ADDR) $(YLW)Make sure that address and UDP port are available from the internet!$(RST) -$(GRN)Your enode address is:$(RST) endef export INFO_MSG -all: checks start show info enode +all: checks start show info enode-qr checks: ifeq (, $(shell which docker)) @@ -51,10 +55,14 @@ ifndef CONTAINER_NAME endif enode: keys/nodeaddr - @echo "enode://$(shell cat keys/nodeaddr)@$(PUBLIC_IP):$(LISTEN_PORT)" + @echo $(ENODE_ADDR) +enode-qr: keys/nodeaddr + @qrencode -t UTF8 $(ENODE_ADDR) + +logs: LOG_LINES ?= 100 logs: - docker-compose logs -f -t --tail=100 + docker-compose logs -f -t --tail=$(LOG_LINES) info: @echo "$$INFO_MSG" diff --git a/_assets/compose/mailserver/Makefile b/_assets/compose/mailserver/Makefile index 914aba6c1..e025179ce 100644 --- a/_assets/compose/mailserver/Makefile +++ b/_assets/compose/mailserver/Makefile @@ -24,8 +24,7 @@ export MAIL_PASSWORD ?= status-offline-inbox define INFO_MSG * $(GRN)Your mailserver is listening on:$(RST) $(BLD)$(PUBLIC_IP):$(LISTEN_PORT)$(RST) - -$(GRN)Your enode address is:$(RST) + * $(GRN)Your enode address is:$(RST) $(shell $(GIT_ROOT)/_assets/scripts/get_enode.sh 2>/dev/null) $(YLW)Make sure that IP and TCP port are available from the internet!$(RST) @@ -66,8 +65,9 @@ enode: enode-qr: @$(GIT_ROOT)/_assets/scripts/get_enode.sh --qr +logs: LOG_LINES ?= 100 logs: - docker-compose logs -f -t --tail=100 + docker-compose logs -f -t --tail=$(LOG_LINES) start: config @echo " * $(GRN)Starting '$(CONTAINER_NAME)' container...$(RST)" diff --git a/_assets/systemd/bootnode/Makefile b/_assets/systemd/bootnode/Makefile index 32130cbd5..72c8302ef 100644 --- a/_assets/systemd/bootnode/Makefile +++ b/_assets/systemd/bootnode/Makefile @@ -29,16 +29,16 @@ export LOG_LEVEL ?= 3 export LISTEN_PORT ?= 30301 # Info -STATUS = $(shell systemctl $(SCTL_OPTS) is-active $(SERVICE_NAME)) -NODE_ADDR = $(shell cat $(ADDR_PATH)) -ENODE = enode://$(NODE_ADDR)@$(PUBLIC_IP):$(LISTEN_PORT) +STATUS = $(shell systemctl $(SCTL_OPTS) is-active $(SERVICE_NAME)) +NODE_ADDR = $(shell cat $(ADDR_PATH)) +ENODE_ADDR = enode://$(NODE_ADDR)@$(PUBLIC_IP):$(LISTEN_PORT) define INFO_MSG * $(GRN)Your bootnode is listening on:$(RST) $(BLD)$(PUBLIC_IP):$(LISTEN_PORT)$(RST) + * $(GRN)Your enode address is:$(RST) +$(ENODE_ADDR) $(YLW)Make sure that IP and TCP port are available from the internet!$(RST) -$(GRN)Your enode address is:$(RST) -$(ENODE) endef export INFO_MSG diff --git a/_assets/systemd/mailserver/Makefile b/_assets/systemd/mailserver/Makefile index be9dff86c..415daba8a 100644 --- a/_assets/systemd/mailserver/Makefile +++ b/_assets/systemd/mailserver/Makefile @@ -34,8 +34,7 @@ STATUS = $(shell systemctl $(SCTL_OPTS) is-active $(SERVICE_NAME)) define INFO_MSG * $(GRN)Your mailserver is listening on:$(RST) $(BLD)$(PUBLIC_IP):$(LISTEN_PORT)$(RST) - -$(GRN)Your enode address is:$(RST) + * $(GRN)Your enode address is:$(RST) $(shell $(GIT_ROOT)/_assets/scripts/get_enode.sh 2>/dev/null) $(YLW)Make sure that IP and TCP port are available from the internet!$(RST)