diff --git a/tormon/index.tt b/tormon/index.tt
new file mode 100644
index 0000000..141b0a4
--- /dev/null
+++ b/tormon/index.tt
@@ -0,0 +1,19 @@
+
Tor Relay/Bridge Monitor
+This is a simple service which sends emails when a Tor relay/bridge goes down. I built it after Tor's Weather service which also did this vanished mysteriously.
+
+
+
diff --git a/tormon/tormon.fcgi b/tormon/tormon.fcgi
index 6b05e7b..f9f07b4 100755
--- a/tormon/tormon.fcgi
+++ b/tormon/tormon.fcgi
@@ -8,6 +8,8 @@ use File::Slurp;
use Template::Simple;
use FindBin qw($Bin);
+my $VERSION = "1.0";
+
my $tmpl = new Template::Simple (
pre_delim => "<%",
post_delim => "%>",
@@ -33,11 +35,13 @@ while ($request->Accept() <= 0) {
switch ($ENV{"REQUEST_URI"}) {
case "/debug" {
+ # TODO - remove this, it's a security vulnerability
use Data::Dumper;
$content = "";
}
case "/" {
- $content = "Hello, world!";
+ my $tt = read_file("$Bin/index.tt");
+ $content = ${ $tmpl->render($tt, {version => $VERSION}) };
}
}
diff --git a/tormon/wrapper.tt b/tormon/wrapper.tt
index 57a8869..3d87f91 100644
--- a/tormon/wrapper.tt
+++ b/tormon/wrapper.tt
@@ -3,7 +3,13 @@
Tor Relay/Bridge Monitor