]> git.openstreetmap.org Git - chef.git/blob - cookbooks/planet/templates/default/planet-update.erb
dda8e5dfab1a95744b376d7dd691d0a590c73096
[chef.git] / cookbooks / planet / templates / default / planet-update.erb
1 #!/bin/sh
2
3 # DO NOT EDIT - This file is being maintained by Chef
4
5 exec > /var/log/planet-update.log 2>&1
6
7 echo "Updating planet file..."
8
9 runuser -u planet -- /usr/local/bin/planet-update-file
10
11 echo "Running jobs..."
12 <% node[:planet][:current][:jobs].each_value do |job| -%>
13
14 echo "Running '<%= job[:command] %>' as user '<%= job[:user] %>'..."
15
16 runuser -u "<%= job[:user] %>" -- "<%= job[:command] %>"
17 <% end -%>
18
19 echo "Done."