install.hostmaster.inc 1.15 KB
Newer Older
1
2
3
<?php

/**
4
 * @file install the hostmaster system
5
6
 */

7
function drush_provision_hostmaster_install($site) {
8
  $platform = drush_locate_root(drush_get_option(array('r', 'root'), NULL));
9
10
  // verify the current platform
  drush_backend_invoke('provision-verify', array(
11
    'root' => $platform,
12
    'provision_context' => "platform",
13
    'publish_path' => $platform,
14
    'platform' => '5') // dirty hardcoded to create the first platform apache config
15
                       // this will become unnecessary when we have drush aliases
16
17
  );

18
  // install the hostmaster site
19
  $data = drush_backend_invoke('provision-install', array(
20
21
22
    $site, 
    'uri' => $site, 
    'root' => $platform, 
23
    'client_email' => drush_get_option('client_email', 'webmaster@localhost'),
24
25
    'profile' => "hostmaster",
    'provision_context' => "site",
26
27
    'site_port' => drush_get_option('web_port', 80)),
    'GET', TRUE
28
  );
29
30
31
32
33

  drush_print("Initializing the hosting system");
  drush_backend_invoke('hosting-setup', array('uri' => $site, 'root' => $platform));
  
  drush_print(dt("Aegir is now installed. You can visit it at @link", array('@link' => $data['context']['login_link'])));
34
35
}