mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-28 10:05:18 +01:00
Moved statuspage from proxy to gatekeeper and refactored correctly
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user