]> git.openstreetmap.org Git - chef.git/blob - cookbooks/taginfo/templates/default/update-taginfo.erb
Taginfo: get osmium-tool from git and compile it.
[chef.git] / cookbooks / taginfo / templates / default / update-taginfo.erb
1 #!/bin/sh
2
3 # DO NOT EDIT - This file is being maintained by Chef
4
5 set -e
6
7 ROOT="<%= @directory %>"
8
9 cd $ROOT/taginfo/sources
10
11 if [ -f "$ROOT/data/taginfo-history.db" ]
12 then
13     cp $ROOT/data/taginfo-history.db $ROOT/sources
14 fi
15
16 $ROOT/taginfo/sources/update_all.sh $ROOT/sources
17
18 mv $ROOT/data/taginfo-* $ROOT/data/old
19 mv $ROOT/sources/taginfo-*.db $ROOT/sources/*/taginfo-*.db $ROOT/data
20 mv $ROOT/sources/download/* $ROOT/download
21
22 sudo /usr/bin/passenger-config restart-app $ROOT/taginfo/web > /dev/null
23
24 find $ROOT/sources/log -mtime +28 -delete