blob: bdba6a5f89393b38f2bc4a33cd6c3e2fef2526b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
. /usr/local/bin/bashlib
servername=`param hostname`
gamemodename=`param gamemode`
add=`param online`
echo "Content-type: text/html"
echo ""
cat ./fileparts/header.html
echo "<body>"
#It seems quotes are enough,see
#https://stackoverflow.com/questions/4273074/sanitize-user-input-in-bash-for-security-purposes
echo "hostname:$servername"
echo "gamemode:$gamemodename"
echo "online:$add"
if ( $add -eq "true" ) then
cat "$servername" >> ./servers.txt
echo "Server $servername added"
fi
echo "<p>Servers currently running Winter Survival 2 - Anarchy:<br/>"
echo "</body>"
cat ./fileparts/footer.html
|