]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/recipes/cgimap.rb
Make cgimap stop and reload use the PID file
[chef.git] / cookbooks / web / recipes / cgimap.rb
index db86bd6f9a7962a3e4a9f9ef0952fcbb4ee2c4d2..ce0e3c6d4c11e057b9a0d5ee4da3597ecc31fc20 100644 (file)
@@ -96,7 +96,9 @@ 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{/home/rails/bin/map}, "#{cgimap_directory}/.libs/lt-map")
+  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
     line.gsub!(/--daemon/, "--daemon --readonly")