Commit 9a225fcf authored by helmo's avatar helmo

Merge remote-tracking branch 'origin/6.x-2.x-backports' into 6.x-2.x

parents dffa256a ad48db1b
......@@ -174,11 +174,13 @@ class Provision_Context_server extends Provision_Context {
}
if (provision_file()->exists($path)->status()) {
$options = array_merge(array(
$default_options = array(
'relative' => TRUE,
'keep-dirlinks' => TRUE,
'omit-dir-times' => TRUE,
), $additional_options);
);
$global_extra_options = drush_get_option('global_sync_options', array());
$options = array_merge($default_options, $additional_options, $global_extra_options);
// We need to do this due to how drush creates the rsync command.
......
......@@ -63,6 +63,9 @@ function drush_provision_drupal_pre_provision_deploy($backup_file) {
provision_file()->chgrp(drush_get_option('extract_path') . '/private/files', d('@server_master')->web_group, TRUE)
->succeed('Changed group ownership of private files in <code>@path</code> to @gid')
->fail('Could not change group ownership of private files in <code>@path</code> to @gid');
provision_file()->chgrp(drush_get_option('extract_path') . '/private/temp', d('@server_master')->web_group, TRUE)
->succeed('Changed group ownership of temp files in <code>@path</code> to @gid')
->fail('Could not change group ownership of temp files in <code>@path</code> to @gid');
if (drush_get_option('deploy_replace_site', FALSE)) {
......
......@@ -154,19 +154,7 @@ function install_main() {
}
_provision_drupal_create_directories();
// create the admin account
$account = user_load(1);
$edit['name'] = $name;
$edit['pass'] = $account_pass;
$edit['mail'] = $client_email;
$edit['status'] = 1;
// temporarily disable drupal's default mail notification
$prev = variable_get('user_mail_status_activated_notify', TRUE);
variable_set('user_mail_status_activated_notify', FALSE);
$account = user_save($account, $edit);
variable_set('user_mail_status_activated_notify', $prev);
$onetime = user_pass_reset_url($account);
// Store the one time login link in an option so the front end can direct the user to their new site.
drush_set_option('login_link', $onetime . '/login');
......
......@@ -142,17 +142,20 @@ function provision_drupal_push_site($override_slave_authority = FALSE) {
* running operations that need files where the slave is authoritative.
*
* E.g. before a backup is made.
*
* @param string $alias The site alias to work on, defaults to the current site.
*/
function provision_drupal_fetch_site() {
function provision_drupal_fetch_site($alias = NULL) {
$site = d($alias);
// synch filesystem changes back from the remote server.
d()->service('http')->fetch(d()->site_path . '/files/');
d()->service('http')->fetch(d()->site_path . '/private/');
d()->service('http')->fetch(d()->site_path . '/modules/');
d()->service('http')->fetch(d()->site_path . '/themes/');
d()->service('http')->fetch(d()->site_path . '/libraries/');
$site->service('http')->fetch($site->site_path . '/files/');
$site->service('http')->fetch($site->site_path . '/private/');
$site->service('http')->fetch($site->site_path . '/modules/');
$site->service('http')->fetch($site->site_path . '/themes/');
$site->service('http')->fetch($site->site_path . '/libraries/');
// Questionable... who is authoritive?
d()->service('http')->fetch(d()->site_path . '/local.settings.php');
$site->service('http')->fetch($site->site_path . '/local.settings.php');
}
/**
......
......@@ -343,11 +343,13 @@ function drush_provision_verify() {
function _provision_default_web_group() {
$info = posix_getgrgid(posix_getgid());
$common_groups = array(
'www',
'httpd',
'www-data',
'apache',
'nginx',
'www',
'_www',
'webservd',
'httpd',
'nogroup',
'nobody',
$info['name']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment