Drupal update script

I made a drupal update script for ubuntu which uses ftp to update drupal sites (not everyone has ssh yet).

It doesn't have all the functionality yet I would like it to have, but it functions for updating.

This script may help you to update multiple drupal sites faster then you'd otherwise be capable of.

--Install--
To use it unzip the attachment. It has the drupalupdate.csh and directories d5 and d6.

For drupal core updating get the latest core version, unpack it, place it in d5 or d6 and rename the dir "drupal-x.y" to "core".
For drupal5 make sure you omit /sites/default/settings.php or your database connection will be lost after the update.

Other modules can be placed in /d5 or /d6 as well with their own name.

So you might get:

#drupalscripts#
#drupalscripts#/d5
#drupalscripts#/d5/core
#drupalscripts#/d5/views
#drupalscripts#/d5/cck
#drupalscripts#/d5/webform
#drupalscripts#/d6
#drupalscripts#/d6/core
#drupalscripts#/d6/views
#drupalscripts#/d6/cck
#drupalscripts#/d6/twitter

in drupalupdate.csh you have to fill in the details of all your sites.
(( snr++ ));
sitename[$snr]="domain1";
sitebasedomain[$snr]="www.domain1.com";
siteadminuser[$snr]="admin";
siteadminpasswd[$snr]="xxx";
ftpuser[$snr]="ftp";
ftppasswd[$snr]="yyy";
ftpserver[$snr]="ftp.domain1.com";
ftpdrupalbase[$snr]="public_html";
drupalversion[$snr]="6";

(( snr++ ));
sitename[$snr]="domain2";
sitebasedomain[$snr]="www.domain2.com";
siteadminuser[$snr]="admin";
siteadminpasswd[$snr]="xxx";
ftpuser[$snr]="ftp";
ftppasswd[$snr]="yyy";
ftpserver[$snr]="ftp.domain2.com";
ftpdrupalbase[$snr]=".";
drupalversion[$snr]="5";

you can place as much sites as you want in there.
"siteadminuser" and "siteadminpassword" are not used yet.
"ftpdrupalbase" needs to be the basedir of the drupal install after login to the ftp site.

drupalupdate.csh depends on wget (which can be received from the synaptic package manager)

make sure drupalupdate.csh is executable.

--Usage--
Make sure you have the latest version of drupal core and drupal modules in the /d5 and /d6 dir

drupalupdate.csh %sitename% %modules%

%sitename% is one of the sites listed in the array, %sitename% is required.
%modules% is the name of all modules that need to be updated. If omitted "core" is updated

examples:
drupalupdate.csh site1
#updates core

drupalupdate.csh site1 core views cck
#updates core + views +cck

drupalupdate.csh site1 views cck
#updates views+cck

After the updates your browser is opened to #site#/user so you can login as administrator and execute /update.php

--Wishlist--
*automatic database backup
*automatic update.php execution
*get a list per site of to be updated modules and update those automatically

--Code--
Unzip the attachment. It contains the script and the minimal directory structure. Place the latest core and modules you want to be updated in the /d5 and /d6 dirs, adjust the array in drupalupdate.csh and use the script.

drupalcshscripts.zip7.49 KB