Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel authored and daniel committed Sep 30, 2020
1 parent 2aa433c commit b2a77a5
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions install/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
die("Can not create configuration again: " . json_encode($_SERVER));
}

$databaseUser = "youphptube";
$databasePass = "youphptube";
if (version_compare(phpversion(), '7.2', '<')) {
$databaseUser = "root";
}

$webSiteRootURL = @$argv[1];
$databaseUser = empty($argv[2]) ? "youphptube" : $argv[2];
$databasePass = empty($argv[3]) ? "youphptube" : $argv[3];
$databaseUser = empty($argv[2])?$databaseUser:$argv[2];
$databasePass = empty($argv[3])?$databasePass:$argv[3];
$systemAdminPass = empty($argv[4]) ? "123" : $argv[4];
while (!filter_var($webSiteRootURL, FILTER_VALIDATE_URL)) {
if (!empty($webSiteRootURL)) {
Expand All @@ -20,9 +26,12 @@
ob_flush();
$webSiteRootURL = trim(readline(""));
}

$webSiteRootURL = rtrim($webSiteRootURL, '/') . '/';

$_POST['systemRootPath'] = "/var/www/html/YouPHPTube/Encoder/";
if(!is_dir($_POST['systemRootPath'])){
$_POST['systemRootPath'] = "/var/www/html/AVideo/Encoder/";
}
$_POST['databaseHost'] = "localhost";
$_POST['databaseUser'] = $databaseUser;
$_POST['databasePass'] = $databasePass;
Expand Down

0 comments on commit b2a77a5

Please sign in to comment.