<div dir="ltr"><div><div><div><div><div><div>I have a drush alias file for all my sites (some multisite, some single site, see <a href="http://drupal.org/node/670460">http://drupal.org/node/670460</a>). <br></div>I then use "drush alias updatedb" for all sites in a multisite installation to make sure that all databases are updated. <br>
<br></div>(of course, I have a development multisite installation as well, so that I can test the updates first). <br><br></div>"drush site-alias"<br></div>gives you a list of all your aliases, so in principle, you could create script like this:<br>
<br>#!/bin/bash<br>for site in `/usr/local/drush/drush site-alias`<br>do<br></div><div> drush update<br></div><div> drush updatedb<br>done<br></div><div>(I repeat the drush update for all sites, in case some of the modules are not used by all sites)<br>
<br></div>However, that would update all your databases. Since I update develop first, I actually have two update scripts:<br><br>#!/bin/bash<br>for site in "firstdev" "seconddev" "thirddev" "forthdev" <br>
do<br> echo "running updates for ${site}"<br> /usr/local/drush/drush @${site} up<br> /usr/local/drush/drush @${site} updatedb<br></div> /usr/local/drush/drush @${site} cc all<br><div>done<br><br></div><div>(and then of course a second one for the production sites)<br>
<br></div><div>Hope this helps, <br><br>Ursula<br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 17, 2013 at 8:13 AM, John Summerfield <span dir="ltr"><<a href="mailto:summer@js.id.au" target="_blank">summer@js.id.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 17/04/13 20:33, Kenneth Jacker wrote:<br>
> Not sure what you mean here ...<br>
><br>
> Use 'find' and the shell to do what?<br>
><br>
><br>
> Sorry if I'm being dumb/dense,<br>
<br>
</div>[root@TestServer ~]# find /var/www/sites -name settings.php<br>
/var/www/sites/testserver/sites/default/settings.php<br>
[root@TestServer ~]#<br>
<br>
The settings.php directories show which sites' databased need to be<br>
updated. I don't have multiple sites set up so it's hard to demonstrate.<br>
<br>
To work back a little,<br>
[root@TestServer ~]# find /var/www/sites -name settings.php -exec<br>
dirname {} \;<br>
/var/www/sites/testserver/sites/default<br>
[root@TestServer ~]#<br>
When I set up multisites under D6, there were directories beside<br>
/var/www/sites/testserver/sites/default that reflected the domain names<br>
of the sites .<br>
<br>
I think that still works, but now there is also sites.php. If you can<br>
code in PHP (I can't really), then you can read that in PHP and work on<br>
the $sites array.<br>
<br>
This demonstrates making some sense of the sites.php from the commandline:<br>
[root@TestServer ~]# cat<br>
/var/www/sites/testserver/sites/example.sites.php | awk '/\$sites\[/<br>
{if ($2 ~ ".sites") { printf "%s\t%s\t%s\t%s\n", $1, $2, $3,$4}}'<br>
* $sites['<a href="http://dev.drupal.org" target="_blank">dev.drupal.org</a>'] = '<a href="http://example.com" target="_blank">example.com</a>';<br>
* $sites['localhost.example'] = '<a href="http://example.com" target="_blank">example.com</a>';<br>
* $sites['8080.localhost.example'] = '<a href="http://example.com" target="_blank">example.com</a>';<br>
* $sites['8080.www.drupal.org.mysite.test'] =<br>
'<a href="http://example.com" target="_blank">example.com</a>';<br>
[root@TestServer ~]#<br>
<br>
Note that in reality you would have "if ($1" etc, I used 2 here to test<br>
the second word to show the kind of output you should expect.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</div></div></blockquote></div><br></div>