Commit b0108641 authored by helmo's avatar helmo

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

Conflicts:
	aegir.make
	provision.drush.inc
	provision.info
parents e0a8621c f46e05fd
<?php
/**
* @file
* Provides the Provision_Config_Drushrc_Aegir class.
*/
/**
* Class for writing the /var/aegir/.drush/drushrc.php file.
*/
class Provision_Config_Drushrc_Aegir extends Provision_Config_Drushrc {
protected $context_name = 'home.drush';
public $template = 'provision_drushrc_aegir.tpl.php';
public $description = 'Aegir Drush configuration file';
function __construct($context = '@none', $data = array()) {
parent::__construct($context, $data);
$this->load_data();
}
function load_data() {
// List Hosting Features and their enabled status.
$features = hosting_get_features();
foreach ($features as $name => $info) {
$enabled_features[$name] = $info['enabled'];
}
$this->data['hosting_features'] = $enabled_features;
}
}
<?php
/**
* @file
* Template file for an Aegir-wide drushrc file.
*/
print "<?php \n\n\$options['hosting_features'] = ". var_export($hosting_features, TRUE) . ";\n";
?>
<?php
// $Id$
/**
* @file Provision named context platform class.
......
<?php
// $Id$
/**
* @file Provision named context server class.
......
<?php
// $Id$
/**
* @file Provision named context site class.
......
core = 6.x
api = 2
; this makefile fetches the latest Aegir code from git from drupal.org
; it shouldn't really change at all apart from major upgrades, where
; the branch will change
projects[drupal][type] = "core"
; hardcode the version number so we survive core releases
projects[drupal][version] = "6.28"
; fix for issue #2060727, patch from https://drupal.org/node/1954296
projects[drupal][patch][] = "http://drupal.org/files/common.inc_6.28.patch"
; chain into hostmaster from git's 2.x branch
projects[hostmaster][type] = "profile"
projects[hostmaster][download][type] = "git"
projects[hostmaster][download][url] = "http://git.drupal.org/project/hostmaster.git"
projects[hostmaster][download][branch] = "6.x-2.x"
core = 6.x
api = 2
; this makefile fetches the latest release from Drupal.org
; it is maintained through the release.sh script
projects[hostmaster][type] = "core"
projects[hostmaster][patch][] = "http://drupal.org/files/common.inc_6.28.patch"
projects[hostmaster][version] = "6.x-2.0-dev"
......@@ -123,7 +123,8 @@ class Provision_Service_db_mysql extends Provision_Service_db_pdo {
$cmd = sprintf("mysqldump --defaults-file=/dev/fd/3 --single-transaction --quick %s | sed 's|/\\*!50001 CREATE ALGORITHM=UNDEFINED \\*/|/\\*!50001 CREATE \\*/|g; s|/\\*!50017 DEFINER=`[^`]*`@`[^`]*`\s*\\*/||g' | sed '/\\*!50013 DEFINER=.*/ d' > %s/database.sql", escapeshellcmd(drush_get_option('db_name')), escapeshellcmd(d()->site_path));
$success = $this->safe_shell_exec($cmd, drush_get_option('db_host'), urldecode(drush_get_option('db_user')), urldecode(drush_get_option('db_passwd')));
if (!$success && !drush_get_option('force', FALSE)) {
$dump_size_too_small = filesize(d()->site_path . '/database.sql') < 1024;
if ((!$success || $dump_size_too_small) && !drush_get_option('force', FALSE)) {
drush_set_error('PROVISION_BACKUP_FAILED', dt('Could not generate database backup from mysqldump. (error: %msg)', array('%msg' => $this->safe_shell_exec_output)));
}
// Reset the umask to normal permissions.
......
<?php
// $Id$
function drush_db_provision_clone_validate() {
d()->service('db')->connect();
}
<?php
// $Id$
/**
* @file
* Mysql provisioning module.
......
<?php
// $Id$
function drush_db_provision_migrate_validate() {
d()->service('db')->connect();
......@@ -7,5 +6,6 @@ function drush_db_provision_migrate_validate() {
// Deletes the old database credentials
function drush_db_post_provision_migrate() {
provision_reload_config('site', d()->site_path . '/drushrc.php');
d()->service('db')->destroy_site_database();
}
......@@ -24,7 +24,7 @@ if [ "$DPKG_DEBUG" = "developer" ]; then
set -x
fi
VARLIB="/var/aegir"
AEGIRHOME="$(su aegir -s /bin/sh -c 'echo $HOME')"
case "$1" in
configure)
......@@ -51,9 +51,9 @@ case "$1" in
fi
# make sure the configuration file exists before symlinking it in place (below)
touch $VARLIB/config/$WEBSERVER.conf
touch $AEGIRHOME/config/$WEBSERVER.conf
# fix permissions on installed directories
chown aegir:aegir "$VARLIB" "$VARLIB/config" "$VARLIB/config/$WEBSERVER.conf"
chown aegir:aegir "$AEGIRHOME" "$AEGIRHOME/config" "$AEGIRHOME/config/$WEBSERVER.conf"
# flush the drush cache to find new commands
su -s /bin/sh aegir -c 'drush cc drush'
......@@ -65,7 +65,7 @@ case "$1" in
. $TEMPFILE
echo "Aegir frontend (@hostmaster) site detected in $drupal_root"
# make those paths canonical to make sure we can compare correctly
NEW_PLATFORM=`readlink -f "$VARLIB/hostmaster-$VERSION"`
NEW_PLATFORM=`readlink -f "$AEGIRHOME/hostmaster-$VERSION"`
drupal_root=`readlink -f $drupal_root`
# we upgrade only if the target platform doesn't exit *OR*
# if it's not the current platform
......@@ -106,8 +106,8 @@ case "$1" in
db_fset aegir/db_password "seen" "true" || true
db_stop
if [ -d $VARLIB/.drush/provision ]; then
echo "existing provision in $VARLIB/.drush/provision detected, move away and try again"
if [ -d $AEGIRHOME/.drush/provision ]; then
echo "existing provision in $AEGIRHOME/.drush/provision detected, move away and try again"
exit 1
fi
echo "installing the Aegir frontend (Drupal with the hostmaster profile), please wait..."
......@@ -116,7 +116,7 @@ case "$1" in
fi
# pass data through JSON for extra security
su -s /bin/sh aegir -c "cd $VARLIB && drush hostmaster-install $FLAGS --backend $site_uri 2>&1 | drush backend-parse $DEBUG" <<EOF
su -s /bin/sh aegir -c "cd $AEGIRHOME && drush hostmaster-install $FLAGS --backend $site_uri 2>&1 | drush backend-parse $DEBUG" <<EOF
{ "yes": 1,
"version": "$VERSION",
"aegir_db_host": "$AEGIR_DB_HOST",
......@@ -134,12 +134,12 @@ EOF
case $WEBSERVER in
apache)
ln -sf $VARLIB/config/$WEBSERVER.conf /etc/apache2/conf.d/aegir.conf
ln -sf $AEGIRHOME/config/$WEBSERVER.conf /etc/apache2/conf.d/aegir.conf
a2enmod ssl rewrite
apache2ctl graceful
;;
nginx)
ln -sf $VARLIB/config/$WEBSERVER.conf /etc/nginx/conf.d/aegir.conf
ln -sf $AEGIRHOME/config/$WEBSERVER.conf /etc/nginx/conf.d/aegir.conf
service nginx reload
;;
esac
......
......@@ -40,12 +40,12 @@ case "$1" in
adduser --quiet aegir www-data
if [ -d /etc/sudoers.d ]; then
ucf --debconf-ok /usr/share/doc/aegir-provision2/examples/example.sudoers /etc/sudoers.d/aegir
ucf --debconf-ok /usr/share/doc/aegir2-provision/examples/example.sudoers /etc/sudoers.d/aegir
ucfr aegir-provision /etc/sudoers.d/aegir
chmod 440 /etc/sudoers.d/aegir
else
echo "running an older version of sudo"
echo "copy content of /usr/share/doc/aegir-provision2/examples/example.sudoers into /etc/sudoers for aegir to run properly"
echo "copy content of /usr/share/doc/aegir2-provision/examples/example.sudoers into /etc/sudoers for aegir to run properly"
fi
;;
......
......@@ -23,7 +23,7 @@ if [ "$DPKG_DEBUG" = "developer" ]; then
fi
case "$1" in
purge)
purge|abort-install|disappear)
# delete the aegir user
# http://wiki.debian.org/AccountHandlingInMaintainerScripts
if which deluser >/dev/null 2>&1 ; then
......@@ -35,14 +35,13 @@ case "$1" in
# unregister sudo config file
ucf --purge /etc/sudoers.d/aegir
rm -f /etc/sudoers.d/aegir
;;
remove|upgrade|abort-install|disappear)
# unregister apache config
( rm /etc/apache/conf.d/aegir.conf > /dev/null 2>&1 && invoke-rc.d apache force-reload ) || true
( rm /etc/apache2/conf.d/aegir.conf > /dev/null 2>&1 && invoke-rc.d apache2 force-reload ) || true
;;
abort-upgrade|failed-upgrade)
remove|upgrade|abort-upgrade|failed-upgrade)
# nothing to do here, especially: don't remove the configs!!
true
;;
......
aegir2-provision (2.0) unstable; urgency=low
* stable 2.0 release
* significant stability improvements, Drush 5 and 6 support,
subdirectory multisite support, improved nginx support, native views
and more: http://community.aegirproject.org/2.0
-- Antoine Beaupré <anarcat@debian.org> Wed, 08 Jan 2014 15:05:24 -0500
aegir2-provision (2.0~rc5.1) testing; urgency=low
* rebuild package with all makefiles and modules
-- Antoine Beaupré <anarcat@debian.org> Thu, 17 Oct 2013 16:15:42 -0400
aegir2-provision (2.0~rc5) unstable; urgency=low
* This release ships a ton of bugfixes we have found in RC4. We also
finalised subdirectory support which, while it still has some issues,
is now actually working correctly, even on multiple servers. The IP
allocation code for SSL on multiple servers was also fixed, making
this probably the most solid multi-server Aegir release ever. We also
did some API cleanups that seemed necessary before the final 2.0
release.
* Finally, we should also mentionned that the install process was
significantly sped up thanks to the use of Drupal.org distributions to
ship a single tarball for the hostmaster platform instead of using a
makefile to build it from its parts all the times. During out tests,
the platform make step went from 60 seconds to 1.5 seconds, an amazing
improvement!
* Note that the binary package name changes here
-- Antoine Beaupré <anarcat@debian.org> Thu, 17 Oct 2013 10:21:36 -0400
aegir-provision2 (2.0~rc4) unstable; urgency=low
* Fixes a missed step in the 2.0~rc3 release process.
-- Christopher Gervais <chris@ergonlogic.com> Fri, 30 Aug 2013 15:46:06 -0400
aegir-provision2 (2.0~rc3) unstable; urgency=low
* This release mainly fixes a couple critical bugs in 2.0-rc2 that were
causing problems when sites were being cloned or renamed.
* We've added a couple small features, such as additional options during
hostmaster-install, and allowing the redirect to the Welcome page to be
turned off.
* Also, we've made a small addition to the API, in that there is now a hook
available (hook_provision_drupal_create_directories_alter()) to allow
altering the directories created when a site installed.
-- Christopher Gervais <chris@ergonlogic.com> Thu, 29 Aug 2013 11:53:43 -0400
aegir-provision2 (2.0~rc2) unstable; urgency=low
* This release mainly fixes an error during the rc1 release, which had not
......
Source: aegir-provision2
Source: aegir2-provision
Section: admin
Priority: optional
Maintainer: Antoine Beaupré <anarcat@debian.org>
......@@ -9,13 +9,13 @@ Homepage: http://aegirproject.org/
Vcs-git: http://git.drupal.org/project/provision.git
Vcs-browser: http://drupalcode.org/project/provision.git
Package: aegir-provision2
Package: aegir2-provision
Architecture: all
Depends: ${misc:Depends}, drush (>= 5.5), php5-mysql, mysql-client, sudo, postfix | mail-transport-agent, apache2 | nginx, adduser, ucf
Depends: ${misc:Depends}, drush (>= 5.10), php5-mysql, mysql-client, sudo, postfix | mail-transport-agent, apache2 | nginx, adduser, ucf
Recommends: mysql-server, rsync
Suggests: drush-make
Conflicts: aegir-provision
Replaces: aegir-provision
Conflicts: aegir-provision, aegir-provision2
Replaces: aegir-provision, aegir-provision2
Description: mass Drupal hosting system - backend
A set of contributed modules for Drupal that aims to solve the
problem of managing a large number of Drupal sites. It does this by
......@@ -29,12 +29,12 @@ Description: mass Drupal hosting system - backend
files. It can be installed standalone although it is usually
installed with the hostmaster frontend.
Package: aegir-hostmaster2
Package: aegir2-hostmaster
Architecture: all
Depends: ${misc:Depends}, drush (>= 5.5), php5-mysql, apache2 | nginx, libapache2-mod-php5 | php5-fpm, aegir-provision2 (>= ${source:Version}), git-core, unzip, lsb-base (>= 3.0-6)
Depends: ${misc:Depends}, drush (>= 5.5), php5-mysql, apache2 | nginx, libapache2-mod-php5 | php5-fpm, aegir2-provision (>= ${source:Version}), git-core, unzip, lsb-base (>= 3.0-6)
Recommends: php5-gd, php5
Conflicts: aegir-hostmaster
Replaces: aegir-hostmaster
Conflicts: aegir-hostmaster, aegir-hostmaster2
Replaces: aegir-hostmaster, aegir-hostmaster2
Description: mass Drupal hosting system - frontend
A set of contributed modules for Drupal that aims to solve the
problem of managing a large number of Drupal sites. It does this by
......@@ -53,7 +53,7 @@ Description: mass Drupal hosting system - frontend
Package: aegir2
Architecture: all
Depends: ${misc:Depends}, aegir-provision2 (>= ${source:Version}), aegir-hostmaster2 (>= ${source:Version})
Depends: ${misc:Depends}, aegir2-provision (>= ${source:Version}), aegir2-hostmaster (>= ${source:Version})
Conflicts: aegir
Replaces: aegir
Description: mass Drupal hosting system
......@@ -67,12 +67,12 @@ Description: mass Drupal hosting system
This meta-package will install both the frontend (aegir-hostmaster)
and the backend (aegir-provision).
Package: aegir-cluster-slave2
Package: aegir2-cluster-slave
Architecture: all
Depends: ${misc:Depends}, php5-mysql, sudo, apache2, adduser, ucf, libapache2-mod-php5, rsync, nfs-client, mysql-client
Recommends: php5-gd, php5
Conflicts: aegir-cluster-slave
Replaces: aegir-cluster-slave
Conflicts: aegir-cluster-slave, aegir-cluster-slave2
Replaces: aegir-cluster-slave, aegir-cluster-slave2
Description: web frontend for the Aegir hosting system
Configuration of lightweight slave servers for the Aegir "pack"
clustering system.
......
......@@ -8,13 +8,14 @@
dh $@
override_dh_install:
cp -r "$(CURDIR)/db/" "$(CURDIR)/dns/" "$(CURDIR)/http/" "$(CURDIR)/aegir.make" "$(CURDIR)/platform/" "$(CURDIR)/Provision/" "$(CURDIR)/Symfony/" "$(CURDIR)"/*.inc "$(CURDIR)"/*.php "$(CURDIR)"/*.info "$(CURDIR)/debian/aegir-provision2/usr/share/drush/commands/provision/"
cp -r "$(CURDIR)/db/" "$(CURDIR)/dns/" "$(CURDIR)/http/" "$(CURDIR)/"*.make "$(CURDIR)/platform/" "$(CURDIR)/Provision/" "$(CURDIR)/Symfony/" "$(CURDIR)"/*.inc "$(CURDIR)"/*.php "$(CURDIR)"/*.info "$(CURDIR)/debian/aegir2-provision/usr/share/drush/commands/provision/"
# We need this nasty hack, because we added a directory.
# We need this nasty hack, because we added directories.
# TODO: this is really lame, there must be a better way to do this?
if [ -d "$(CURDIR)/provision-tests" ]; then cp -r "$(CURDIR)/provision-tests/" "$(CURDIR)/debian/aegir-provision2/usr/share/drush/commands/provision/"; fi
if [ -d "$(CURDIR)/provision-tests" ]; then cp -r "$(CURDIR)/provision-tests/" "$(CURDIR)/debian/aegir2-provision/usr/share/drush/commands/provision/"; fi
if [ -d "$(CURDIR)/subdirs" ]; then cp -r "$(CURDIR)/subdirs/" "$(CURDIR)/debian/aegir2-provision/usr/share/drush/commands/provision/"; fi
cp "$(CURDIR)/debian/aegir-provision2.lintian" "$(CURDIR)/debian/aegir-provision2/usr/share/lintian/overrides/aegir-provision"
cp "$(CURDIR)/debian/aegir2-provision.lintian" "$(CURDIR)/debian/aegir2-provision/usr/share/lintian/overrides/aegir-provision"
override_dh_installinit:
dh_installinit --name=hosting-queued
......
<?php
/**
* Implements hook_drush_load().
*
* Checks if the corresponsing Hosting Feature is installed and enabled.
*/
function dns_drush_load() {
$features = drush_get_option('hosting_features', array());
return array_key_exists('dns', $features) && $features['dns'];
}
<?php
// $Id$
/**
* @file
......
<?php
/**
* The site_data service class.
*/
class Provision_Service_site_data extends Provision_Service {
public $service = 'site_data';
/**
* Add the needed properties to the site context.
*/
static function subscribe_site($context) {
$context->setProperty('site_data');
}
}
<?php
/**
* Implements hook_drush_init().
*/
function site_data_drush_init() {
site_data_provision_register_autoload();
}
/**
* Register our directory as a place to find provision classes.
*/
function site_data_provision_register_autoload() {
static $loaded = FALSE;
if (!$loaded) {
$loaded = TRUE;
provision_autoload_register_prefix('Provision_', dirname(__FILE__));
}
}
/**
* Expose the service type this extension defines to provision.
*
* @return
* An array with the service type the key, and the default implementation the value.
*/
function site_data_provision_services() {
site_data_provision_register_autoload();
return array('site_data' => NULL);
}
/**
* Implements drush_hook_post_COMMAND().
*/
function drush_site_data_post_provision_install() {
drush_log('[SITE_DATA] d()->site_data: ' . d()->site_data, 'warning');
}
<?php
/**
* Implements hook_drush_load().
*
* Checks if the corresponsing Hosting Feature is enabled.
*/
function site_data_drush_load() {
$features = drush_get_option('hosting_features', array());
return array_key_exists('site_data', $features) && $features['site_data'];
}
......@@ -44,9 +44,9 @@ if (sizeof($this->aliases)) {
RewriteEngine on
<?php
if ($this->redirection) {
// Redirect all aliases to the main https url.
print " RewriteCond %{HTTP_HOST} !^{$this->uri}$ [NC]\n";
print " RewriteRule ^/*(.*)$ https://{$this->uri}/$1 [NE,L,R=301]\n";
// Redirect to the selected alias.
print " RewriteCond %{HTTP_HOST} !^{$this->redirection}$ [NC]\n";
print " RewriteRule ^/*(.*)$ https://{$this->redirection}/$1 [NE,L,R=301]\n";
}
?>
RewriteRule ^/files/(.*)$ /sites/<?php print $this->uri; ?>/files/$1 [L]
......@@ -58,17 +58,33 @@ if ($this->redirection) {
# Error handler for Drupal > 4.6.7
<Directory "<?php print $this->site_path; ?>/files">
SetHandler This_is_a_Drupal_security_line_do_not_remove
<Files *>
SetHandler This_is_a_Drupal_security_line_do_not_remove
</Files>
Options None
Options +FollowSymLinks
# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
</Directory>
# Prevent direct reading of files in the private dir.
# This is for Drupal7 compatibility, which would normally drop
# a .htaccess in those directories, but we explicitly ignore those
<Directory "<?php print $this->site_path; ?>/private/" >
SetHandler This_is_a_Drupal_security_line_do_not_remove
Deny from all
Options None
Options +FollowSymLinks
<Files *>
SetHandler This_is_a_Drupal_security_line_do_not_remove
</Files>
Deny from all
Options None
Options +FollowSymLinks
# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
</Directory>
</VirtualHost>
......
<?php
/**
* Base class for subdir support.
*
* This class will publish the config files to remote
* servers automatically.
*/
class Provision_Config_Apache_Subdir extends Provision_Config_Http {
public $template = 'subdir.tpl.php';
public $disabled_template = 'subdir_disabled.tpl.php';
public $description = 'subdirectory support';
// hack: because the parent class doesn't support multiple config
// files, we need to keep track of the alias we're working on.
protected $current_alias;
function write() {
foreach (d()->aliases as $alias) {
if (strpos($alias, '/')) {
$this->current_alias = $alias;
drush_log("Subdirectory alias `$alias` found. Creating configuration files.", 'notice');
$uri_path = $this->data['http_subdird_path'] . '/' . $this->uri();
provision_file()->create_dir($uri_path, dt("Webserver subdir configuration for domain"), 0700);
$this->context->platform->server->sync($uri_path, array(
'exclude' => $uri_path . '/*', // Make sure remote directory is created
));
parent::write();
}
}
}
/**
* Guess the URI this subdir alias is related too.
*/
function uri() {
$e = explode('/', $this->current_alias, 2);
return $e[0];
}
/**
* Guess the subdir part of the subdir alias.
*/
function subdir() {
$e = explode('/', $this->current_alias, 2);
return $e[1];
}
function process() {
parent::process();
$this->data['uri'] = $this->uri();
$this->data['subdir'] = $this->subdir();
if (!$this->site_enabled) {
$this->template = $this->disabled_template;
}
}
function filename() {
return $this->data['http_subdird_path'] . '/' . $this->uri() . '/' . $this->subdir() . '.conf';
}
}
<?php
/**
* Base class for subdir support.
*
* This class will publish the config files to remote
* servers automatically.
*/
class Provision_Config_Apache_SubdirVhost extends Provision_Config_Http {
public $template = 'subdir_vhost.tpl.php';
public $description = 'subdirectory vhost support';
// hack: because the parent class doesn't support multiple config
// files, we need to keep track of the alias we're working on.
protected $current_alias;
/**
* Guess the URI this subdir alias is related too.
*/
function uri() {
$e = explode('/', $this->current_alias, 2);
return $e[0];
}
/**
* Guess the subdir part of the subdir alias.
*/
function subdir() {
$e = explode('/', $this->current_alias, 2);
return $e[1];
}
/**
* Check if the (real) parent site (drushrc) exists.
*/
function parent_site() {
$u = explode('/config/', $this->data['http_vhostd_path'], 2);
$p = $u[0] . '/.drush/';
$parent_site_drushrc = $p . $this->uri() . '.alias.drushrc.php';
drush_log(dt('Checking %vhost drushrc: %drushrc', array('%vhost' => $this->uri(), '%drushrc' => $parent_site_drushrc)), 'notice');
if (provision_file()->exists($parent_site_drushrc)->status()) {
$e = TRUE;
}
else {
$e = FALSE;
}
return $e;
}
function write() {
$count = "0";
$site_has_parent = FALSE;
$mode_is_install = FALSE;
$command = drush_get_command();
$command = explode(" ", $command['command']);
if (preg_match("/^provision-install/", $command[0])) {
drush_log(dt('Subdir Install Mode Detected: %command', array('%command' => $command[0])), 'notice');
$mode_is_install = TRUE;
}
elseif (preg_match("/^provision-verify/", $command[0])) {
drush_log(dt('Subdir Verify Mode Detected: %command', array('%command' => $command[0])), 'notice');
}
else {
drush_log(dt('Subdir Other Mode Detected: %command', array('%command' => $command[0])), 'notice');
}
foreach (d()->aliases as $alias) {
if (strpos($alias, '/')) {
$this->current_alias = $alias;
if ($this->parent_site()) {
$site_has_parent = TRUE;
drush_log(dt('Parent site %vhost exists for alias %alias, skipping', array('%vhost' => $this->uri(), '%alias' => $alias)), 'notice');
if ($count == "0" && $this->uri() && $mode_is_install) {
$site_name = '@' . $this->uri();
drush_log(dt('Parent site %vhost re-verify required to include subdir config for %alias', array('%vhost' => $site_name, '%alias' => $alias)), 'warning');
//
// drush_invoke_process('@none', 'cache-clear', array('drush'));
// provision_backend_invoke($site_name, 'provision-verify');
// drush_invoke_process('@none', 'cache-clear', array('drush'));
//
// Running automated re-verify for the parent site is currently
// too dangerous. It will destroy/delete the parent site's database
// if the parent and the subdir site use different installation
// profiles, unless both profiles exist in the same platform.