forked from STI/Astroport.ONE
SERVING.............................. 1234 PORT
This commit is contained in:
parent
e9adb470d9
commit
20f18a20bd
6
12345.sh
6
12345.sh
|
@ -33,13 +33,15 @@ PORT=12345
|
||||||
HOMEPAGE="$HOME/.zen/Astroport.ONE/templates/instascan.html"
|
HOMEPAGE="$HOME/.zen/Astroport.ONE/templates/instascan.html"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
echo "SERVING.............................. 1234 PORT"
|
||||||
if [[ $HOMEPAGE ]]; then
|
if [[ $HOMEPAGE != "" ]]; then
|
||||||
|
echo "HOMEPAGE"
|
||||||
echo "HTTP/1.1 200 Everything Is Just Fine
|
echo "HTTP/1.1 200 Everything Is Just Fine
|
||||||
Server: Astroport
|
Server: Astroport
|
||||||
Content-Type: text/html; charset=UTF-8" > $HOME/.zen/tmp/myIP.http.${MOATS}
|
Content-Type: text/html; charset=UTF-8" > $HOME/.zen/tmp/myIP.http.${MOATS}
|
||||||
cat $HOMEPAGE >> $HOME/.zen/tmp/myIP.http.${MOATS}
|
cat $HOMEPAGE >> $HOME/.zen/tmp/myIP.http.${MOATS}
|
||||||
else
|
else
|
||||||
|
echo "WAITING PAGE"
|
||||||
# REPLACE myIP in http response template
|
# 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}
|
sed "s~127.0.0.1:12345~$myIP:$PORT~g" $HOME/.zen/Astroport.ONE/templates/index.http > ~/.zen/tmp/myIP.http.${MOATS}
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue