]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/recipes/default.rb
Run smartmontools update-smart-drivedb occasionally
[chef.git] / cookbooks / hardware / recipes / default.rb
index 6e155f04ffbf6e27fd7e41062489c03707357512..90505366370844bd2e67240ff473cd5e0b85e1f7 100644 (file)
@@ -402,6 +402,13 @@ disks = disks.compact.uniq
 if disks.count.positive?
   package "smartmontools"
 
+  template "/etc/cron.daily/update-smart-drivedb" do
+    source "expire.cron.erb"
+    owner "root"
+    group "root"
+    mode "755"
+  end
+
   template "/usr/local/bin/smartd-mailer" do
     source "smartd-mailer.erb"
     owner "root"
@@ -424,7 +431,7 @@ if disks.count.positive?
     mode "644"
   end
 
-  service "smartd" do
+  service "smartmontools" do
     action [:enable, :start]
     subscribes :reload, "template[/etc/smartd.conf]"
     subscribes :restart, "template[/etc/default/smartmontools]"