]> git.openstreetmap.org Git - chef.git/blob - cookbooks/planet/templates/default/planet-update.erb
Merge remote-tracking branch 'github/pull/430'
[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 /sbin/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 /sbin/runuser -u "<%= job[:user] %>" -- "<%= job[:command] %>"
17 <% end -%>
18
19 echo "Done."