|
|
|
@ -34,10 +34,10 @@ class Setup
|
|
|
|
|
|
|
|
|
|
// run init |
|
|
|
|
if ($this->_type == 'd') { |
|
|
|
|
shell_exec('php init --env=Development --overwrite=n'); |
|
|
|
|
shell_exec('php ' . __DIR__ . '/init --env=Development --overwrite=n'); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
shell_exec('php init --env=Production --overwrite=n'); |
|
|
|
|
shell_exec('php ' . __DIR__ . '/init --env=Production --overwrite=n'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// config db |
|
|
|
@ -145,12 +145,14 @@ class Setup
|
|
|
|
|
$site_domain = $this->_http_protocol . '://' . $this->_domain; |
|
|
|
|
$admin_domain = $this->_http_protocol . '://admin.' . $this->_domain; |
|
|
|
|
$static_domain = $this->_http_protocol . '://static.' . $this->_domain; |
|
|
|
|
$cookie_domain = '.' . $this->_domain; |
|
|
|
|
|
|
|
|
|
$content = preg_replace('/(("|\')frontendHostInfo("|\')\s*=>\s*)(""|\'\')/', "\\1'$site_domain'", $content); |
|
|
|
|
$content = preg_replace('/(("|\')backendHostInfo("|\')\s*=>\s*)(""|\'\')/', "\\1'$admin_domain'", $content); |
|
|
|
|
$content = preg_replace('/(("|\')staticHostInfo("|\')\s*=>\s*)(""|\'\')/', "\\1'$static_domain'", $content); |
|
|
|
|
$content = preg_replace('/(("|\')supportEmail("|\')\s*=>\s*)(""|\'\')/', "\\1'$this->_email'", $content); |
|
|
|
|
$content = preg_replace('/(("|\')adminEmail("|\')\s*=>\s*)(""|\'\')/', "\\1'$this->_email'", $content); |
|
|
|
|
$content = preg_replace('/(("|\')cookieDomain("|\')\s*=>\s*)(""|\'\')/', "\\1'$cookie_domain'", $content); |
|
|
|
|
|
|
|
|
|
file_put_contents($file, $content); |
|
|
|
|
} |
|
|
|
|