mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
feat(install): Autofill Host
in robots.txt
file (#1916)
This commit is contained in:
parent
a3da6f5386
commit
03eeb08ad1
1 changed files with 8 additions and 0 deletions
|
@ -401,6 +401,14 @@ if (!empty($DB_HOST) && !empty($DB_DATABASE) && !empty($DB_USERNAME)) {
|
|||
$conn->close();
|
||||
out("- Importing SQL dump completed!\n", 'success');
|
||||
|
||||
// Autofill host in robots.txt
|
||||
$robots_txt_file = BB_ROOT . 'robots.txt';
|
||||
if (isset($TP_HOST) && is_file($robots_txt_file)) {
|
||||
$content = file_get_contents($robots_txt_file);
|
||||
$content = str_replace('example.com', $TP_HOST, $content);
|
||||
file_put_contents($robots_txt_file, $content);
|
||||
}
|
||||
|
||||
if (isset($APP_ENV) && $APP_ENV === 'local') {
|
||||
if (!is_file(BB_ROOT . 'library/config.local.php')) {
|
||||
if (copy(BB_ROOT . 'library/config.php', BB_ROOT . 'library/config.local.php')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue