diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2009-12-29 17:22:19 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2009-12-29 17:22:19 -0200 |
commit | 1812d8167cd95beaa4106755890f385a814b141c (patch) | |
tree | cd160d265c37b5d693940f51fd52e1509c50df13 /templates/drupal-update.sh.erb | |
parent | f11ee828bfedbd9a7166dab30a94ea266f9996ec (diff) | |
download | puppet-drupal-1812d8167cd95beaa4106755890f385a814b141c.tar.gz puppet-drupal-1812d8167cd95beaa4106755890f385a814b141c.tar.bz2 |
Fixing drupal update template file name
Diffstat (limited to 'templates/drupal-update.sh.erb')
-rw-r--r-- | templates/drupal-update.sh.erb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/templates/drupal-update.sh.erb b/templates/drupal-update.sh.erb new file mode 100644 index 0000000..75e8381 --- /dev/null +++ b/templates/drupal-update.sh.erb @@ -0,0 +1,24 @@ +#!/bin/bash +# +# This file is used to update all drupal instances in the host. +# + +for version in 5 6; do + # Setup base and sites folders + base="<%= $apache_www_folder %>/drupal-$version" + cd $base/sites + drupals="`ls -I default -I all`" + + # Issue updates + for drupal in $drupals; do + # Ignore symlinks so sites are updated just once + if [ ! -h $drupal ]; then + echo "Processing $drupal..." + drush -l $drupal update + fi + done + + # Fix permissions + chown -R root.root $base/sites/all/modules + chown -R root.root $base/sites/all/themes +done |