aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-12-29 15:46:23 -0200
committerSilvio Rhatto <rhatto@riseup.net>2009-12-29 15:46:23 -0200
commite2a75915f76409cdc75f1b330c635be58f1950cc (patch)
tree188931365ebe6c38b01d1c6df50f7515f48b4764 /templates
downloadpuppet-drupal-e2a75915f76409cdc75f1b330c635be58f1950cc.tar.gz
puppet-drupal-e2a75915f76409cdc75f1b330c635be58f1950cc.tar.bz2
Initial import
Diffstat (limited to 'templates')
-rw-r--r--templates/drush-update.sh.erb24
1 files changed, 24 insertions, 0 deletions
diff --git a/templates/drush-update.sh.erb b/templates/drush-update.sh.erb
new file mode 100644
index 0000000..75e8381
--- /dev/null
+++ b/templates/drush-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