From 3f78010520a4a6c4eb43825893c233df97931823 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 26 Oct 2022 16:27:07 +0200 Subject: [PATCH] m' --- 12345.sh | 2 ++ templates/homepage.html | 2 +- templates/index.302 | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 templates/index.302 diff --git a/12345.sh b/12345.sh index 047081de..0450bd24 100755 --- a/12345.sh +++ b/12345.sh @@ -64,6 +64,7 @@ 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 +sed -i "s~_HOSTNAME_~$(hostname)~g" ~/.zen/tmp/123/${MOATS}.index.redirect cat ~/.zen/tmp/123/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 & @@ -163,6 +164,7 @@ cat ~/.zen/tmp/123/${MOATS}.messaging.json >> ~/.zen/tmp/123/${MOATS}.index.redi [[ $OLDIP == "_SECRET_" ]] && echo "_SECRET_ TW" && sed -i "s~_SECRET_~${myIP}~g" ~/.zen/tmp/123/${MOATS}.astroindex.html && OLDIP=$myIP # AM I MANAGING TW [[ $OLDIP != $myIP ]] && TWIP=$OLDIP + echo "*********** OFFICIAL LOGIN GOES TO $TWIP" else echo "***** TRY OFFICIAL ***** http://$myIP:1234/?salt=$SALT&pepper=$PEPPER&official=on" fi diff --git a/templates/homepage.html b/templates/homepage.html index 4247610d..ea8190bb 100644 --- a/templates/homepage.html +++ b/templates/homepage.html @@ -2,7 +2,7 @@ - [Astroport] Système de Fichier Interplanétaire - Station _IPFSNODEID_ + [Astroport] Système de Fichier Interplanétaire - Station (_IPFSNODEID_) _HOSTNAME_ diff --git a/templates/index.302 b/templates/index.302 new file mode 100644 index 00000000..27ed33cf --- /dev/null +++ b/templates/index.302 @@ -0,0 +1,2 @@ +HTTP/1.1 302 Found +Location: http://127.0.0.1:8080/ipns/_TWLINK_