]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/mailman/recipes/default.rb
Use strings for file modes
[chef.git] / cookbooks / mailman / recipes / default.rb
index 6e53ee8e531a17fb080a287d65fc716944600477..bd88b9d92e2232e225d94d90386009d58bf9c82f 100644 (file)
@@ -29,10 +29,17 @@ template "/etc/mailman/mm_cfg.py" do
   source "mm_cfg.py.erb"
   user "root"
   group "root"
-  mode 0o644
+  mode "644"
   notifies :restart, "service[mailman]"
 end
 
+execute "newlist" do
+  command "newlist -q mailman mailman@example.com mailman"
+  user "root"
+  group "root"
+  not_if { ::File.exist?("/var/lib/mailman/lists/mailman/") }
+end
+
 service "mailman" do
   action [:enable, :start]
   supports :restart => true, :reload => true
@@ -56,5 +63,5 @@ template "/etc/cron.daily/lists-backup" do
   source "backup.cron.erb"
   owner "root"
   group "root"
-  mode 0o755
+  mode "755"
 end