]> git.openstreetmap.org Git - chef.git/commitdiff
Update taginfo databases atomically
authorTom Hughes <tom@compton.nu>
Sat, 6 May 2023 15:56:20 +0000 (16:56 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 6 May 2023 15:56:20 +0000 (16:56 +0100)
Closes #588

cookbooks/taginfo/templates/default/update.erb

index caad713535e30848ab0aa5eb5ec5c818bb970208..f2d1dde59ac7b63e06a87ace4d2a97d96b44e8f4 100644 (file)
@@ -15,8 +15,8 @@ fi
 
 $ROOT/taginfo/sources/update_all.sh $ROOT/sources
 
-mv $ROOT/data/taginfo-* $ROOT/data/old
-mv $ROOT/sources/taginfo-*.db $ROOT/sources/*/taginfo-*.db $ROOT/data
+ln -f $ROOT/data/taginfo-* $ROOT/data/old
+mv -f $ROOT/sources/taginfo-*.db $ROOT/sources/*/taginfo-*.db $ROOT/data
 mv $ROOT/sources/download/* $ROOT/download
 
 PASSENGER_INSTANCE_REGISTRY_DIR=<%= node[:passenger][:instance_registry_dir] %> /usr/bin/passenger-config restart-app $ROOT/taginfo/web > /dev/null