]> git.openstreetmap.org Git - chef.git/commitdiff
Restart squid if /dev/shm entries are missing
authorTom Hughes <tom@compton.nu>
Tue, 12 Nov 2019 13:46:52 +0000 (13:46 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 12 Nov 2019 13:46:52 +0000 (13:46 +0000)
cookbooks/squid/recipes/default.rb

index c2bd5b834c6b5e49b56f188de7c8f09df3b6adc5..ce1edf966a4210efa0f59d3638debe0fb230e1d2 100644 (file)
@@ -124,6 +124,14 @@ log "squid-restart" do
   end
 end
 
+log "squid-restart-shm" do
+  message "Restarting squid due to remounted /dev/shm"
+  notifies :restart, "service[squid]"
+  not_if do
+    File.exist?("/dev/shm/squid-squid-page-pool.shm")
+  end
+end
+
 munin_plugin "squid_cache"
 munin_plugin "squid_times"
 munin_plugin "squid_icp"