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")
25 directory "/etc/supybot" do
31 template "/etc/supybot/supybot.conf" do
32 source "supybot.conf.erb"
36 variables :passwords => passwords
39 template "/etc/supybot/channels.conf" do
40 source "channels.conf.erb"
46 template "/etc/supybot/git.conf" do
53 template "/etc/supybot/ignores.conf" do
54 source "ignores.conf.erb"
60 template "/etc/supybot/userdata.conf" do
61 source "userdata.conf.erb"
67 template "/etc/supybot/users.conf" do
68 source "users.conf.erb"
72 variables :passwords => users
75 directory "/var/lib/supybot" do
81 directory "/var/lib/supybot/data" do
87 directory "/var/lib/supybot/backup" do
93 directory "/var/lib/supybot/git" do
99 directory "/var/log/supybot" do
105 directory "/usr/local/lib/supybot" do
111 directory "/usr/local/lib/supybot/plugins" do
117 git "/usr/local/lib/supybot/plugins/Git" do
119 repository "git://github.com/mmueller/supybot-git"
125 template "/etc/init.d/supybot" do
126 source "supybot.init.erb"
133 action [ :enable, :start ]
134 supports :restart => true
135 subscribes :restart, "template[/etc/supybot/supybot.conf]"
136 subscribes :restart, "template[/etc/supybot/channels.conf]"
137 subscribes :restart, "template[/etc/supybot/git.conf]"
138 subscribes :restart, "template[/etc/supybot/ignores.conf]"
139 subscribes :restart, "template[/etc/supybot/userdata.conf]"
140 subscribes :restart, "template[/etc/supybot/users.conf]"
141 subscribes :restart, "git[/usr/local/lib/supybot/plugins/Git]"
142 subscribes :restart, "template[/etc/init.d/supybot]"