Commit 74f83a1 1 parent 5d6af18 commit 74f83a1 Copy full SHA for 74f83a1
File tree 3 files changed +37
-4
lines changed
3 files changed +37
-4
lines changed Original file line number Diff line number Diff line change 543
543
end
544
544
545
545
template "/usr/local/bin/replicate" do
546
- source "replicate.erb"
546
+ source "replicate-custom .erb"
547
547
owner "root"
548
548
group "root"
549
549
mode "755"
609
609
mode "775"
610
610
end
611
611
612
+ template "/usr/local/bin/replicate" do
613
+ source "replicate-osm2pgsql.erb"
614
+ owner "root"
615
+ group "root"
616
+ mode "755"
617
+ end
618
+
612
619
systemd_service "expire-tiles" do
613
620
description "Tile dirtying service"
614
621
type "simple"
655
662
after "postgresql.service"
656
663
wants "postgresql.service"
657
664
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"
659
666
sandbox :enable_network => true
660
667
restrict_address_families "AF_UNIX"
661
668
read_write_paths [
662
669
"/store/database/nodes" ,
663
670
"/var/lib/replicate"
664
671
]
665
- restart "always"
666
- restart_sec 30
672
+ restart "on-failure"
667
673
end
668
674
669
675
service "replicate" do
670
676
action [ :enable , :start ]
677
+ subscribes :restart , "template[/usr/local/bin/replicate]"
671
678
subscribes :restart , "systemd_service[replicate]"
672
679
end
673
680
end
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