<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 &quot;drush alias updatedb&quot; 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>&quot;drush  site-alias&quot;<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 &quot;firstdev&quot; &quot;seconddev&quot; &quot;thirddev&quot; &quot;forthdev&quot; <br>
do<br>  echo &quot;running updates for ${site}&quot;<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">&lt;<a href="mailto:summer@js.id.au" target="_blank">summer@js.id.au</a>&gt;</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>
&gt; Not sure what you mean here ...<br>
&gt;<br>
&gt; Use &#39;find&#39; and the shell to do what?<br>
&gt;<br>
&gt;<br>
&gt; Sorry if I&#39;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&#39; databased need to be<br>
updated. I don&#39;t have multiple sites set up so it&#39;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&#39;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 &#39;/\$sites\[/<br>
{if ($2 ~ &quot;.sites&quot;) { printf &quot;%s\t%s\t%s\t%s\n&quot;,  $1, $2, $3,$4}}&#39;<br>
*       $sites[&#39;<a href="http://dev.drupal.org" target="_blank">dev.drupal.org</a>&#39;]        =       &#39;<a href="http://example.com" target="_blank">example.com</a>&#39;;<br>
*       $sites[&#39;localhost.example&#39;]     =       &#39;<a href="http://example.com" target="_blank">example.com</a>&#39;;<br>
*       $sites[&#39;8080.localhost.example&#39;]        =       &#39;<a href="http://example.com" target="_blank">example.com</a>&#39;;<br>
*       $sites[&#39;8080.www.drupal.org.mysite.test&#39;]       =<br>
&#39;<a href="http://example.com" target="_blank">example.com</a>&#39;;<br>
[root@TestServer ~]#<br>
<br>
Note that in reality you would have &quot;if ($1&quot; 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>