Fix webserver deployment

This commit is contained in:
DeathByDenim 2022-02-24 19:30:57 -05:00
parent 4c2fb8f1cb
commit 24b1de1564
Signed by: DeathByDenim
GPG Key ID: 4A475283D925365B
3 changed files with 2 additions and 24 deletions

View File

@ -23,12 +23,13 @@ for file in /var/www/html/*\.html; do
sed -i $file -e s/"HOSTEDBYNAME"/"${HOSTEDBYNAME}"/g
done
for file in /var/www/html/*\.html; do
sed -i $file -e "/SERVERSTATE/r $(dirname "$0")/website/_state/online.html"
sed -i $file -e "/SERVERSTATE/r $(dirname "$0")/../website/_state/online.html"
sed -i $file -e "/SERVERSTATE/d"
done
if [ $NOSSL -eq 1 ]; then
for file in /var/www/html/js/*\.js; do
sed -i $file -e s/"wss:"/"ws:"/g
sed -i $file -e s/"https:"/"http:"/g
done
fi

View File

@ -1,2 +0,0 @@
<div class="offline-blur">OFFLINE</div>
<div class="offline">OFFLINE</div>

View File

@ -1,21 +0,0 @@
<noscript>
Live stuff requires JavaScript unfortunately
</noscript>
<h6>CPU</h6>
<div class="graph">
<svg id="cpugraph" width="400" height="200" xmlns="http://www.w3.org/2000/svg">
<rect class="graphframe" x="0" y="0" width="301" height="100" />
</svg>
</div>
<h6>Memory</h6>
<div class="graph">
<svg id="memgraph" width="400" height="200" xmlns="http://www.w3.org/2000/svg">
<rect class="graphframe" x="0" y="0" width="301" height="100" />
</svg>
</div>
<script>
d3.select('#cpugraph').attr('viewBox', '0 0 310 100');
d3.select('#memgraph').attr('viewBox', '0 0 310 100');
update();
setInterval(update, 5000);
</script>