Fix meetbot logs

Fixes bug #992597
Adds new basic index page (to be themed at a later date)
Moves nginx file serving to somewhere safer
Adds /irclogs link

Change-Id: Idae341741cd852e98b93a5b89d720615789fd328
This commit is contained in:
Andrew Hutchings 2012-05-01 14:58:02 +01:00
parent acd8cae704
commit 1ab5129e23
3 changed files with 44 additions and 1 deletions

View File

@ -21,6 +21,29 @@ define meetbot::site($nick, $network, $server, $url, $channels, $use_ssl) {
require => File["/var/lib/meetbot"]
}
file { "/srv/meetbot-${name}":
ensure => directory,
}
file { "/srv/meetbot-${name}/index.html":
ensure => present,
content => template("meetbot/index.html.erb"),
require => File["/srv/meetbot-${name}"]
}
file { "/srv/meetbot-${name}/irclogs":
ensure => link,
target => "/var/lib/meetbot/${name}/logs/ChannelLogger/${network}/",
require => File["/srv/meetbot-${name}"]
}
file { "/srv/meetbot-${name}/meetings":
ensure => link,
target => "/var/lib/meetbot/${name}/meetings/",
require => File["/srv/meetbot-${name}"]
}
file { "/var/lib/meetbot/${name}/conf":
ensure => directory,
owner => 'meetbot',

16
templates/index.html.erb Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><%= name.capitalize %> IRC log server</title>
</head>
<body>
<h1>Welcome to <%= name.capitalize %> IRC log server</h1>
<ul>
<li><a href="/irclogs/">Channel Logs</a></li>
<li><a href="/meetings/">Meeting Logs</a></li>
</ul>
</body>
</html>

View File

@ -1,9 +1,13 @@
server {
listen 80;
server_name <%= url %>;
root /var/lib/meetbot/<%= name %>;
root /srv/meetbot-<%= name %>;
location /meetings {
autoindex on;
}
location /irclogs {
autoindex on;
}
}