From 9d45e7f9612e5ae27ef0d1ae95f6d4e6534dfb77 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 6 May 2023 16:56:20 +0100 Subject: [PATCH] Update taginfo databases atomically Closes #588 --- cookbooks/taginfo/templates/default/update.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/taginfo/templates/default/update.erb b/cookbooks/taginfo/templates/default/update.erb index caad71353..f2d1dde59 100644 --- a/cookbooks/taginfo/templates/default/update.erb +++ b/cookbooks/taginfo/templates/default/update.erb @@ -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 -- 2.39.5