From 1d663359337b4c5074bb5605851fce0c73ea4445 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 29 Dec 2009 16:32:29 -0200 Subject: New management scripts --- templates/drupal-update.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 templates/drupal-update.sh (limited to 'templates/drupal-update.sh') diff --git a/templates/drupal-update.sh b/templates/drupal-update.sh new file mode 100644 index 0000000..75e8381 --- /dev/null +++ b/templates/drupal-update.sh @@ -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 -- cgit v1.2.3