From 20f18a20bdf5275e779cfe95306a8c33bd85df1d Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 21 Oct 2022 18:15:11 +0200 Subject: [PATCH] SERVING.............................. 1234 PORT --- 12345.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/12345.sh b/12345.sh index d09968d1..77756b28 100755 --- a/12345.sh +++ b/12345.sh @@ -33,13 +33,15 @@ PORT=12345 HOMEPAGE="$HOME/.zen/Astroport.ONE/templates/instascan.html" while true; do - - if [[ $HOMEPAGE ]]; then + echo "SERVING.............................. 1234 PORT" + if [[ $HOMEPAGE != "" ]]; then + echo "HOMEPAGE" echo "HTTP/1.1 200 Everything Is Just Fine Server: Astroport Content-Type: text/html; charset=UTF-8" > $HOME/.zen/tmp/myIP.http.${MOATS} cat $HOMEPAGE >> $HOME/.zen/tmp/myIP.http.${MOATS} else + echo "WAITING PAGE" # REPLACE myIP in http response template sed "s~127.0.0.1:12345~$myIP:$PORT~g" $HOME/.zen/Astroport.ONE/templates/index.http > ~/.zen/tmp/myIP.http.${MOATS} fi