If Domain is setup for https redirection, use https for easy install scripts

This commit is contained in:
earnolmartin 2018-05-20 01:07:36 -06:00
parent 21c91e7963
commit b72b64ed46

View file

@ -14248,7 +14248,17 @@ function installScriptForceEdition($scriptname,$domainname,$installInfoNeeded){
function runCurlToCompleteInstall($scriptname,$domainname,$directory,$targetdirectory,$dbName,$dbUserName,$dbPass,$mysql_host,$titleForScript,$adminEmail){ function runCurlToCompleteInstall($scriptname,$domainname,$directory,$targetdirectory,$dbName,$dbUserName,$dbPass,$mysql_host,$titleForScript,$adminEmail){
$this->requireCommandLine(__FUNCTION__); $this->requireCommandLine(__FUNCTION__);
$insScript = "bash /var/www/new/ehcp/scripts/curl_installer/curlInstallScript.sh '" . $scriptname . "' '" . $domainname . "' '" . $directory . "' '" . $targetdirectory . "' '" . $dbName . "' '" . $dbUserName . "' '" . $dbPass . "' '" . $mysql_host . "' \"" . $titleForScript . "\" '" . $adminEmail . "' '" . $this->wwwuser . "' '" . $this->wwwgroup . "' '" . $this->miscconfig['webservermode'] . "' > /dev/null 2>&1 &";
$modeToSend = $this->miscconfig['webservermode'];
if($this->miscconfig['webservermode'] == "ssl"){
// Figure out if we should use https or http depending on the domain setting
$domainInfo = $this->getDomainInfo($domainname);
if($domainInfo["ssl_redirect_https"]){
$modeToSend = "sslonly";
}
}
$insScript = "bash /var/www/new/ehcp/scripts/curl_installer/curlInstallScript.sh '" . $scriptname . "' '" . $domainname . "' '" . $directory . "' '" . $targetdirectory . "' '" . $dbName . "' '" . $dbUserName . "' '" . $dbPass . "' '" . $mysql_host . "' \"" . $titleForScript . "\" '" . $adminEmail . "' '" . $this->wwwuser . "' '" . $this->wwwgroup . "' '" . $modeToSend . "' > /dev/null 2>&1 &";
passthru2($insScript, true, true); passthru2($insScript, true, true);
return true; return true;
} }