diff --git a/12345.sh b/12345.sh index 973e22853..047081dee 100755 --- a/12345.sh +++ b/12345.sh @@ -63,6 +63,7 @@ Server: Astroport Content-Type: text/html; charset=UTF-8 " > ~/.zen/tmp/123/${MOATS}.index.redirect sed "s~127.0.0.1~$myIP~g" $HOME/.zen/Astroport.ONE/templates/homepage.html >> ~/.zen/tmp/123/${MOATS}.index.redirect +sed -i "s~_IPFSNODEID_~$IPFSNODEID~g" ~/.zen/tmp/123/${MOATS}.index.redirect cat ~/.zen/tmp/123/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 & diff --git a/start.sh b/start.sh index 756325b25..d0c490a26 100755 --- a/start.sh +++ b/start.sh @@ -12,8 +12,7 @@ ME="${0##*/}" TS=$(date -u +%s%N | cut -b1-13) MOATS=$(date -u +"%Y%m%d%H%M%S%4N") -killall 12345.sh -killall nc +killall 12345.sh; killall nc echo ' _ ____ _____ ____ ___ ____ ___ ____ _____ ___ _ _ _____ @@ -36,7 +35,7 @@ YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail [[ ! $YOU ]] && echo "Lancez 'ipfs daemon' SVP sudo systemctl start ipfs" && exit 1 IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID) -echo "LAUNCHING 1234 PORT REDIRECTING SPIDER http://myIP:1234" +echo "LAUNCHING 1234 PORT REDIRECTING SPIDER http://$myIP:1234" ~/.zen/Astroport.ONE/12345.sh > ~/.zen/tmp/12345.log & ## CREATE AND OR CONNECT USER diff --git a/templates/homepage.html b/templates/homepage.html index 113ab9fd5..4247610d3 100644 --- a/templates/homepage.html +++ b/templates/homepage.html @@ -2,7 +2,7 @@ - [Astroport] Système de Fichier Interplanétaire - Terraformation Forêt Jardin + [Astroport] Système de Fichier Interplanétaire - Station _IPFSNODEID_ diff --git a/templates/index.redirect b/templates/index.redirect index 2facd6e38..78a6e6916 100644 --- a/templates/index.redirect +++ b/templates/index.redirect @@ -5,6 +5,8 @@ Content-Type: text/html; charset=UTF-8 + [Astroport] Redirecting ... Please refresh if failed +