From c41f3b2db74430b2a060a19b7135c2cbd1111d44 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 13 Apr 2022 20:40:34 +0200 Subject: [PATCH] WHO is IPFSNODEID --- crowdbunker.sh | 3 ++- templates/homepage.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crowdbunker.sh b/crowdbunker.sh index fc3f606..d37e5ea 100755 --- a/crowdbunker.sh +++ b/crowdbunker.sh @@ -22,6 +22,7 @@ TS=$(date -u +%s%N | cut -b1-13) YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) || echo " warning ipfs daemon not running" isLAN=$(hostname -I | awk '{print $1}' | head -n 1 | cut -f3 -d '/' | grep -E "(^127\.)|(^192\.168\.)|(^fd42\:)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/") +IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID) IPFSNGW="https://tube.copylaradio.com" IPFSNGW="http://127.0.0.1:8080" @@ -321,7 +322,7 @@ echo "########################################################################## cp ${MY_PATH}/templates/crowbunkerbox.png ~/.zen/bunkerbox/homepage/ sed -i "s~_IPNSL_~$IPNSL~g" ~/.zen/bunkerbox/homepage/index.html sed -i "s~_VUID_~$INDEX/$VUID~g" ~/.zen/bunkerbox/homepage/index.html - sed -i "s/_DATE_/$(date -u "+%Y-%m-%d#%H:%M:%S")/g " ~/.zen/bunkerbox/homepage/index.html + sed -i "s/_WHO_/$(date -u "+%Y-%m-%d#%H:%M:%S")@$IPFSNODEID/g " ~/.zen/bunkerbox/homepage/index.html sed -i "s~_TITLE_~$TITLE~g" ~/.zen/bunkerbox/homepage/index.html cp ~/.zen/bunkerbox/history.json ~/.zen/bunkerbox/homepage/history.json diff --git a/templates/homepage.html b/templates/homepage.html index e0c8340..5c7dae9 100644 --- a/templates/homepage.html +++ b/templates/homepage.html @@ -2,7 +2,7 @@ - [BunkerBOX] Home _DATE_ + [BunkerBOX] Home _WHO_