imagery: remove stale mapserver socket on start
[chef.git] / cookbooks / imagery / resources / layer.rb
index fb11868439a14ea0310cb0a1f4f24332ae047292..db9c395ed7dd44d0218259f54a30bea145364338 100644 (file)
@@ -53,7 +53,8 @@ action :create do
                 "MS_MAP_PATTERN" => "^/srv/imagery/mapserver/"
     user "imagery"
     group "imagery"
-    exec_start "/usr/bin/spawn-fcgi -s /run/mapserver-fastcgi/layer-#{layer}.socket -M 0666 -P /run/mapserver-fastcgi/layer-#{layer}.pid -- /usr/bin/multiwatch -f 6 -- /usr/lib/cgi-bin/mapserv"
+    exec_start_pre "/bin/rm -f /run/mapserver-fastcgi/layer-#{layer}.socket"
+    exec_start "/usr/bin/spawn-fcgi -s /run/mapserver-fastcgi/layer-#{layer}.socket -M 0666 -P /run/mapserver-fastcgi/layer-#{layer}.pid -- /usr/bin/multiwatch -f 4 -- /usr/lib/cgi-bin/mapserv"
     pid_file "/run/mapserver-fastcgi/layer-#{layer}.pid"
     type "forking"
     restart "always"