Make cgimap stop and reload use the PID file
authorTom Hughes <tom@compton.nu>
Fri, 6 May 2016 22:02:47 +0000 (23:02 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 6 May 2016 22:06:09 +0000 (23:06 +0100)
cookbooks/web/recipes/cgimap.rb

index 8953820ef56856ce4c086b84d13f3286d67172f2..ce0e3c6d4c11e057b9a0d5ee4da3597ecc31fc20 100644 (file)
@@ -96,6 +96,8 @@ cgimap_init = edit_file "#{cgimap_directory}/scripts/cgimap.init" do |line|
   line.gsub!(/^CGIMAP_MEMCACHE=.*;/, "CGIMAP_MEMCACHE=rails1,rails2,rails3;")
   line.gsub!(/^CGIMAP_RATELIMIT=.*;/, "CGIMAP_RATELIMIT=204800;")
 
+  line.gsub!(%r{--pidfile \$CGIMAP_PIDFILE --exec /home/rails/bin/map}, "--pidfile $CGIMAP_PIDFILE")
+
   line.gsub!(%r{/home/rails/bin/map}, "#{cgimap_directory}/map")
 
   if database_readonly