I had an idea this morning to create a module that will update a site in one fell swoop without needing to open a command line. That way I can script configuration changes and enable modules post-drush immediately, without having to do it manually myself clicking through the admin.

My general idea is to do this:

hook_init: Check to see if the module has been run before. To start with, I only want it to run 1 time. If the variable returns false, proceed to step 1

step_1: Run drush using system() (http://us2.php.net/system) to update the core and contrib modules. Question here: can you add -y to the parameter to bypass confirmation of updating?

step_2: Run through our configuration change script and enable new modules (example: going from panels 2 to panels 3 and ctools)

Is this possible? How are some of you updating sites with Drush? I have done a few through command line, but would like to iron out things that change like auto enable all panels and set their CSS ID/Class for example.. I notice those go away when updating from P2>P3.

Comments

moshe weitzman’s picture

Status: Active » Closed (works as designed)

in secure setups, web server cannot touch the drupal code outsides of files directory. so, you'd have to queue up some tasks that drush can complete when it fires up during cron. and then you'll have recreated part of aegir project.

kevinquillen’s picture

Thats where I wound up after some Googling, at Aegir. I'll look into that, thanks.