File tree Expand file tree Collapse file tree 3 files changed +37
-4
lines changed
Expand file tree Collapse file tree 3 files changed +37
-4
lines changed Original file line number Diff line number Diff line change 543543 end
544544
545545 template "/usr/local/bin/replicate" do
546- source "replicate.erb"
546+ source "replicate-custom .erb"
547547 owner "root"
548548 group "root"
549549 mode "755"
609609 mode "775"
610610 end
611611
612+ template "/usr/local/bin/replicate" do
613+ source "replicate-osm2pgsql.erb"
614+ owner "root"
615+ group "root"
616+ mode "755"
617+ end
618+
612619 systemd_service "expire-tiles" do
613620 description "Tile dirtying service"
614621 type "simple"
655662 after "postgresql.service"
656663 wants "postgresql.service"
657664 user "tile"
658- exec_start "/bin/osm2pgsql-replication update --database gis --post-processing / usr/local/bin/replicate-post -- #{ osm2pgsql_arguments . join ( ' ' ) } "
665+ exec_start "/usr/local/bin/replicate"
659666 sandbox :enable_network => true
660667 restrict_address_families "AF_UNIX"
661668 read_write_paths [
662669 "/store/database/nodes" ,
663670 "/var/lib/replicate"
664671 ]
665- restart "always"
666- restart_sec 30
672+ restart "on-failure"
667673 end
668674
669675 service "replicate" do
670676 action [ :enable , :start ]
677+ subscribes :restart , "template[/usr/local/bin/replicate]"
671678 subscribes :restart , "systemd_service[replicate]"
672679 end
673680end
File renamed without changes.
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # DO NOT EDIT - This file is being maintained by Chef
4+
5+ while [ 1 = 1 ]
6+ do
7+ /bin/osm2pgsql-replication update \
8+ --database gis \
9+ --post-processing /usr/local/bin/replicate-post \
10+ -- \
11+ --number-processes=1 \
12+ --log-progress=false \
13+ --expire-tiles=13-19 \
14+ --expire-output=/var/lib/replicate/dirty-tiles.txt \
15+ < % if node[:tile][:database][:multi_geometry] -%>
16+ --multi-geometry \
17+ < % end -%>
18+ < % if node[:tile][:database][:hstore] -%>
19+ --hstore \
20+ < % end -%>
21+ < % if node[:tile][:database][:tag_transform_script] -%>
22+ --tag-transform-script=< %= node[:tile][:database][:tag_transform_script] %>
23+ < % end -%>
24+
25+ sleep 30
26+ done
You can’t perform that action at this time.
0 commit comments