2 # Cookbook Name:: supybot
5 # Copyright 2013, OpenStreetMap Foundation
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
20 users = data_bag_item("supybot", "users")
21 passwords = data_bag_item("supybot", "passwords")
26 directory "/etc/supybot" do
32 template "/etc/supybot/supybot.conf" do
33 source "supybot.conf.erb"
37 variables :passwords => passwords
40 template "/etc/supybot/channels.conf" do
41 source "channels.conf.erb"
47 template "/etc/supybot/git.conf" do
54 template "/etc/supybot/ignores.conf" do
55 source "ignores.conf.erb"
61 template "/etc/supybot/userdata.conf" do
62 source "userdata.conf.erb"
68 template "/etc/supybot/users.conf" do
69 source "users.conf.erb"
73 variables :passwords => users
76 directory "/var/lib/supybot" do
82 directory "/var/lib/supybot/data" do
88 directory "/var/lib/supybot/backup" do
94 directory "/var/lib/supybot/git" do
100 directory "/var/log/supybot" do
106 directory "/usr/local/lib/supybot" do
112 directory "/usr/local/lib/supybot/plugins" do
118 git "/usr/local/lib/supybot/plugins/Git" do
120 repository "git://github.com/mmueller/supybot-git"
126 template "/etc/init.d/supybot" do
127 source "supybot.init.erb"
134 action [:enable, :start]
135 supports :restart => true
136 subscribes :restart, "template[/etc/supybot/supybot.conf]"
137 subscribes :restart, "template[/etc/supybot/channels.conf]"
138 subscribes :restart, "template[/etc/supybot/git.conf]"
139 subscribes :restart, "template[/etc/supybot/ignores.conf]"
140 subscribes :restart, "template[/etc/supybot/userdata.conf]"
141 subscribes :restart, "template[/etc/supybot/users.conf]"
142 subscribes :restart, "git[/usr/local/lib/supybot/plugins/Git]"
143 subscribes :restart, "template[/etc/init.d/supybot]"