Commit 62c5bcfb authored by Adrian Rossouw's avatar Adrian Rossouw
Browse files

Merge branch 'dev_server_verify' into dev-services

Conflicts:
	db_server/provision_mysql.drush.inc
	platform/verify.provision.inc
	web_server/provision_apache.drush.inc
	web_server/verify.provision.inc
parents 08a6e912 915cbd85
......@@ -20,15 +20,33 @@ function db_drush_init() {
if (preg_match("/^provision-/", $command[0])) {
// TODO - remove this shit
$master_db = drush_get_option('master_db');
$db = parse_url($master_db);
drush_set_default('master_db_user', urldecode($db['user']));
drush_set_default('master_db_passwd', urldecode($db['pass']));
drush_set_default('master_db_host', urldecode($db['host']));
drush_set_default('db_host', urldecode($db['host']));
if ($master_db) {
$db = parse_url($master_db);
$host = urldecode($db['host']);
$user = urldecode($db['user']);
$pass = urldecode($db['pass']);
$scheme = $db['scheme'];
} else {
#TODO - this stuff is all pretty wrong imo. it should not be asked here
drush_print(dt("No database configuration provided, asking for one interactively"));
$scheme = drush_prompt(dt("Database type"), "mysql");
$host = drush_prompt(dt("Database server"), "localhost");
$user = drush_prompt(dt("Database user"), "root");
system('stty -echo');
$pass = drush_prompt(dt("Database password"));
system('stty echo');
print "\n"; # add a cr since the user's didn't echo
}
drush_set_default('master_db_user', $user);
drush_set_default('master_db_passwd', $pass);
drush_set_default('master_db_host', $host);
drush_set_default('db_host', $host);
drush_set_default('master_db_type', $db['scheme']);
drush_set_default('db_type', $db['scheme']);
drush_set_default('master_db_type', $scheme);
drush_set_default('db_type', $scheme);
$creds = array();
$options = array(
......
......@@ -34,8 +34,8 @@ AEGIR_DOMAIN=aegir.example.com
AEGIR_VERSION=HEAD
AEGIR_HOME=$HOME
WEB_GROUP=www-data
DRUSH_VERSION=All-versions-3.0-beta1
DRUSH_MAKE_VERSION=6.x-2.0-beta6
# doesn't exist yet, but we need drush_prompt in HEAD
DRUSH_VERSION=All-versions-3.0-rc3
# when adding a variable here, add it to the display below
......@@ -190,6 +190,10 @@ else
fi
fi
<<<<<<< HEAD
# this will prompt the user for the database password if not provided through stdin in JSON
$DRUSH provision-server --parent_path=$AEGIR_HOME --web_group=$WEB_GROUP --drush_path=$DRUSH
=======
# this should be handled by provision server verification, as it is a
# duplicate of web_server/provision_apache_server.tpl.php
# http://drupal.org/node/586000
......@@ -216,6 +220,7 @@ Include $AEGIR_HOME/config/platform.d/
Include $AEGIR_HOME/config/apache.d/
EOF
fi
>>>>>>> master
msg "Aegir provision backend installed successfully"
......
<?php
/**
* Drupal-based server configuration
*/
function drush_provision_drupal_provision_server() {
if (!provision_path('exists', drush_get_option('config_path') . '/includes/global.inc', TRUE, dt("Global configuration file exists"))) {
# create an empty global.inc so the include doesn't fail with
# open_basedir restrictions
if (!$file = fopen(drush_get_option('config_path') . '/includes/global.inc', 'a')) {
drush_set_error('PROVISION_FRAMEWORK_ERROR', dt('Cannot create global settings configuration'));
} else {
fwrite($file, "<?php # global settings.php");
fclose($file);
}
}
_provision_create_dir(drush_get_option('backup_path'), dt('Backup'), 0700);
}
<?php
/**
*/
function drush_provision_server() {
_provision_create_dir(drush_get_option('config_path'), dt('Provision configuration'), 0711);
_provision_create_dir(drush_get_option('config_path') . '/includes', dt('Provision PHP configuration'), 0711);
}
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