]> git.openstreetmap.org Git - chef.git/commitdiff
Make paths explicit
authorTom Hughes <tom@compton.nu>
Sun, 24 Sep 2023 14:45:18 +0000 (15:45 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 24 Sep 2023 14:45:18 +0000 (15:45 +0100)
cookbooks/planet/files/default/replication-bin/replicate-minute

index 736a0ce9f11e38c2c9688dddd4cdc2b641bbb7a5..9c54581d8ac1d093913e5048ef5cd223ded4f5bd 100755 (executable)
@@ -9,15 +9,13 @@ osmdbt-get-log --quiet
 osmdbt-catchup --quiet
 osmdbt-create-diff --quiet --with-comment --max-changes=50000
 
-cd /store/planet/replication/minute
-
-. state.txt
+. /store/planet/replication/minute/state.txt
 
 sequencePart1=$(($sequenceNumber / 1000000 % 1000))
 sequencePart2=$(($sequenceNumber / 1000 % 1000))
 sequencePart3=$(($sequenceNumber % 1000))
 diffPath=$(printf "%03d/%03d/%03d" $sequencePart1 $sequencePart2 $sequencePart3)
 
-/opt/awscli/v2/current/bin/aws --profile=osm-pds-upload s3 cp --storage-class=INTELLIGENT_TIERING "${diffPath}.osc.gz" "s3://osm-planet-eu-central-1/planet/replication/minute/${diffPath}.osc.gz"
-/opt/awscli/v2/current/bin/aws --profile=osm-pds-upload s3 cp --storage-class=INTELLIGENT_TIERING "${diffPath}.state.txt" "s3://osm-planet-eu-central-1/planet/replication/minute/${diffPath}.state.txt"
-/opt/awscli/v2/current/bin/aws --profile=osm-pds-upload s3 cp --storage-class=INTELLIGENT_TIERING "state.txt" "s3://osm-planet-eu-central-1/planet/replication/minute/state.txt"
+/opt/awscli/v2/current/bin/aws --profile=osm-pds-upload s3 cp --storage-class=INTELLIGENT_TIERING "/store/planet/replication/minute/${diffPath}.osc.gz" "s3://osm-planet-eu-central-1/planet/replication/minute/${diffPath}.osc.gz"
+/opt/awscli/v2/current/bin/aws --profile=osm-pds-upload s3 cp --storage-class=INTELLIGENT_TIERING "/store/planet/replication/minute/${diffPath}.state.txt" "s3://osm-planet-eu-central-1/planet/replication/minute/${diffPath}.state.txt"
+/opt/awscli/v2/current/bin/aws --profile=osm-pds-upload s3 cp --storage-class=INTELLIGENT_TIERING "/store/planet/replication/minute/state.txt" "s3://osm-planet-eu-central-1/planet/replication/minute/state.txt"