mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
Update install.php
This commit is contained in:
parent
5f95944510
commit
d61a662238
1 changed files with 2 additions and 2 deletions
|
@ -297,14 +297,14 @@ if (!empty($DB_HOST) && !empty($DB_DATABASE) && !empty($DB_USERNAME)) {
|
||||||
|
|
||||||
// Autofill host in robots.txt
|
// Autofill host in robots.txt
|
||||||
$robots_txt_file = BB_ROOT . 'robots.txt';
|
$robots_txt_file = BB_ROOT . 'robots.txt';
|
||||||
if (isset($TP_HOST) && is_file($robots_txt_file)) {
|
if (isset($TP_HOST) && is_file($robots_txt_file) && is_writable($robots_txt_file)) {
|
||||||
$content = file_get_contents($robots_txt_file);
|
$content = file_get_contents($robots_txt_file);
|
||||||
$content = str_replace('example.com', $TP_HOST, $content);
|
$content = str_replace('example.com', $TP_HOST, $content);
|
||||||
file_put_contents($robots_txt_file, $content);
|
file_put_contents($robots_txt_file, $content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Suggest configuration files based on selected web server
|
// Suggest configuration files based on selected web server
|
||||||
out("\n--- Web Server configuration ---\n", 'info');
|
out("--- Web Server configuration ---\n", 'info');
|
||||||
echo "Which web server are you using? (nginx / caddy / apache): ";
|
echo "Which web server are you using? (nginx / caddy / apache): ";
|
||||||
$webserver = mb_strtolower(trim(readline()));
|
$webserver = mb_strtolower(trim(readline()));
|
||||||
$install_dir = 'install' . DIRECTORY_SEPARATOR;
|
$install_dir = 'install' . DIRECTORY_SEPARATOR;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue