Set Config Properly Based on Web Server Type

This commit is contained in:
earnolmartin 2023-10-23 15:36:00 -06:00
parent 5cb246442f
commit b20745dfd4
2 changed files with 5 additions and 2 deletions

View file

@ -89,7 +89,7 @@ newrootpass:$newrootpass
ehcpadminpass:$ehcpadminpass ehcpadminpass:$ehcpadminpass
*/ */
installsql(); installsql($webServerToInstall);
install_vsftpd_server(); install_vsftpd_server();

View file

@ -1520,7 +1520,7 @@ function buildconfigphp(){
} }
function installsql() { function installsql($webServerToInstall) {
global $app,$ehcpinstalldir,$ip,$lang,$user_email,$user_name,$ehcpmysqlpass,$rootpass,$newrootpass,$ehcpadminpass,$debugMode,$mysql_root_pass,$adminEmail; global $app,$ehcpinstalldir,$ip,$lang,$user_email,$user_name,$ehcpmysqlpass,$rootpass,$newrootpass,$ehcpadminpass,$debugMode,$mysql_root_pass,$adminEmail;
bosluk2(); bosluk2();
@ -1609,6 +1609,9 @@ function installsql() {
passthru("cp $ehcpinstalldir/config.php ./config.php"); passthru("cp $ehcpinstalldir/config.php ./config.php");
passthru("rm $ehcpinstalldir/ehcp1.sql"); # removed for security, root pass was there.. passthru("rm $ehcpinstalldir/ehcp1.sql"); # removed for security, root pass was there..
if($webServerToInstall == "nginx"){
exec("mysql -D ehcp -u root --password=$tmprootpass -e \"update misc SET value = 'nginx' WHERE name = 'webservertype';\" 2>&1", $outputLines);
}
$app = new Application(); $app = new Application();
$dbConEstablished = $app->connectTodb(); $dbConEstablished = $app->connectTodb();