Commit 5adaa0ce authored by Adrian Rossouw's avatar Adrian Rossouw

wasted an hour looking for a typo that cased drush to exit with no debug output. YAY.

parent e97ef73d
......@@ -46,13 +46,15 @@ class provisionService_db extends provisionService {
return TRUE;
}
function verify() {
$this->connect();
if ($this->can_create_database()) {
drush_log(dt('Provision can create new databases.'), 'message');
}
else {
drush_set_error('PROVISION_CREATE_DB_FAILED');
function verify() {
if ($this->context->type == 'server') {
$this->connect();
if ($this->can_create_database()) {
drush_log(dt('Provision can create new databases.'), 'message');
}
else {
drush_set_error('PROVISION_CREATE_DB_FAILED');
}
}
}
......
......@@ -23,7 +23,6 @@ include_once(dirname(__FILE__) . '/../apache/apache_service.inc');
class provisionService_http_apache_ssl extends provisionService_http_ssl {
// We share the application name with apache.
protected $application_name = 'apache';
protected $has_restart_cmd = TRUE;
function default_restart_cmd() {
......@@ -34,6 +33,10 @@ class provisionService_http_apache_ssl extends provisionService_http_ssl {
public $ssl_enabled = TRUE;
function cloaked_db_creds() {
return TRUE;
}
/**
* Initialize the configuration files.
*
......
......@@ -23,18 +23,18 @@ class provisionService_http_public extends provisionService_http {
function config_data($config = null, $class = null) {
$data = parent::config_data($config, $class);
$data['http_port'] = $this->server->http_port;
if (!is_null($this->application_name)) {
$data['http_confd_path'] = $this->server->http_confd_path;
$data['http_platformd_path'] = $this->server->http_platformd_path;
$data['http_vhostd_path'] = $this->server->http_vhostd_path;
}
$data['http_port'] = $this->server->http_port;
// TODO: move away from drush_get_context entirely.
if ($config == 'site') {
$data = array_merge($data, drush_get_context_site('site'));
$data = array_merge($data, drush_get_context('site'));
}
return $data;
......@@ -92,6 +92,7 @@ class provisionService_http_public extends provisionService_http {
}
$this->create_config($this->context->type);
$this->parse_configs();
}
......
......@@ -37,8 +37,8 @@ class provisionService_http_ssl extends provisionService_http_public {
function config_data($config = null, $class = null) {
$data = parent::config_data($config, $class);
$data['http_ssl_port'] = $this->server->http_ssl_port;
$data['http_ssl_port'] = $this->server->http_ssl_port;
if ($config == 'site' && $this->context->ssl_enabled) {
if ($ssl_key = $this->context->ssl_key) {
// Retrieve the paths to the cert and key files.
......@@ -50,7 +50,6 @@ class provisionService_http_ssl extends provisionService_http_public {
$data['ip_address'] = $this->server->ip_addresses[0];
}
}
return $data;
}
......@@ -211,7 +210,7 @@ class provisionConfig_http_ssl_site extends provisionConfig_http_site {
parent::__construct($owner, $data);
if (!$this->ssl_enabled || !$this->ssl_key) {
//throw new provisionException_continue("SSL has not been enabled for this site. SSL vhost not necessary");
throw new provisionException_continue("SSL has not been enabled for this site. SSL vhost not necessary");
}
}
......
......@@ -81,9 +81,6 @@ class provisionConfig_global_settings extends provisionConfig {
function filename() {
return $this->include_path . '/global.inc';
}
function process() {
}
}
/**
......
......@@ -49,10 +49,11 @@ class provisionService extends provisionChainedState {
// We cast to array here to silently accept the non array version
foreach ((array) $this->configs[$config] as $class) {
try {
$config = new $class($this->context, $this->config_data($config));
$config->write();
$object = new $class($this->context, $this->config_data($config));
$object->write();
}
catch (provisionException_continue $e) {
drush_log($e->getMessage());
// The service or configuration class has signaled that the config file
// was uneccesary, and we should continue normally.
}
......@@ -71,10 +72,11 @@ class provisionService extends provisionChainedState {
// We cast to array here to silently accept the non array version
foreach ((array) $this->configs[$config] as $class) {
try {
$config = new $class($this->context, $this->config_data($config, $class));
$config->unlink();
$object = new $class($this->context, $this->config_data($config, $class));
$object->unlink();
}
catch (provisionException_continue $e) {
drush_log($e->getMessage());
// The service or configuration class has signaled that the config file
// was uneccesary, and we should continue normally.
}
......
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