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:
parent
42fe2d14c6
commit
7179bdbfbc
@ -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
modules/meetbot/templates/index.html.erb
Normal file
16
modules/meetbot/templates/index.html.erb
Normal 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>
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user