Moved statuspage from proxy to gatekeeper and refactored correctly

This commit is contained in:
kexkey
2018-12-15 15:01:45 -05:00
parent 57f2217abb
commit 7db08bf43f
8 changed files with 59 additions and 33 deletions

View File

@@ -244,12 +244,6 @@ main()
serve_ots_getfile $(echo "${line}" | cut -d ' ' -f2 | cut -d '/' -f3)
break
;;
status)
# curl (GET) http://192.168.111.152:8080/status
status_page
break
;;
esac
break
fi

View File

@@ -18,7 +18,7 @@ response_to_client()
echo -en "Content-Type: ${contenttype}\r\nContent-Length: ${#response}\r\n\r\n${response}"
# Small delay needed for the data to be processed correctly by peer
sleep 0.2s
sleep 0.5s
}
htmlfile_response_to_client()

View File

@@ -1,23 +0,0 @@
#!/bin/sh
. ./trace.sh
. ./responsetoclient.sh
status_page() {
cat <<EOF > statuspage.html
<html>
<head>
</head>
<body>
Hello from Cyphernode!<p/>
EOF
cat db/installation.json >> statuspage.html
cat <<EOF >> statuspage.html
</body>
</html>
EOF
htmlfile_response_to_client ./ statuspage.html
}