From b476d5c6f3f28564b7e186e41fefdb2582775d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 23 Jan 2020 10:20:17 +0100 Subject: [PATCH] include mail password when getting enode with get_enode.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- _assets/scripts/get_enode.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/_assets/scripts/get_enode.sh b/_assets/scripts/get_enode.sh index 6e1e9a1fc..e570a3f66 100755 --- a/_assets/scripts/get_enode.sh +++ b/_assets/scripts/get_enode.sh @@ -6,6 +6,8 @@ RPC_PORT="${RPC_PORT:-8545}" if [[ -z "${PUBLIC_IP}" ]]; then PUBLIC_IP=$(curl -s https://ipecho.net/plain) fi +# Necessary for enode address for Status app +MAIL_PASSWORD="${MAIL_PASSWORD:-status-offline-inbox}" # query local RESP_JSON=$( @@ -23,5 +25,7 @@ ENODE_RAW=$(echo "${RESP_JSON}" | jq -r '.result.enode') # drop arguments at the end of enode address ENODE_CLEAN=$(echo "${ENODE_RAW}" | grep -oP '\Kenode://[^?]+') -# replace localhost with public IP -echo "${ENODE_CLEAN}" | sed s/127.0.0.1/${PUBLIC_IP}/ +# replace localhost with public IP and add mail password +echo "${ENODE_CLEAN}" | sed \ + -e "s/127.0.0.1/${PUBLIC_IP}/" \ + -e "s/@/:${MAIL_PASSWORD}@/"