]> git.openstreetmap.org Git - chef.git/commitdiff
imagery: remove stale mapserver socket on start
authorGrant Slater <git@firefishy.com>
Mon, 30 May 2016 12:48:07 +0000 (13:48 +0100)
committerGrant Slater <git@firefishy.com>
Mon, 30 May 2016 12:48:07 +0000 (13:48 +0100)
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"