summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--servers.sh22
1 files changed, 17 insertions, 5 deletions
diff --git a/servers.sh b/servers.sh
index 31835c1..4e26413 100644
--- a/servers.sh
+++ b/servers.sh
@@ -1,10 +1,22 @@
-./cgi/bashlib.sh
+. /usr/local/bin/bashlib
-param
+servername=`param hostname`
+gamemodename=`param gamemode`
+add=`pram online`
+#It seems quotes are enough,see
+#https://stackoverflow.com/questions/4273074/sanitize-user-input-in-bash-for-security-purposes
+if ( $add -eq "true" ) then
+ cat "$servername" >> servers.txt
+fi
-#echo "Content-type: text/html"
-#echo ""
-#echo "<p>Servers currently running Winter Survival 2 - Anarchy:<br/>"
+echo "Content-type: text/html"
+echo ""
+
+cat ./fileparts/header.html
+echo "<body>"
+echo "<p>Servers currently running Winter Survival 2 - Anarchy:<br/>"
+echo "</body>"
+cat ./fileparts/footer.html