mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-25 17:10:29 +00:00
update
This commit is contained in:
parent
6c3e9cf4cc
commit
9119906f2a
1 changed files with 57 additions and 27 deletions
|
@ -56,6 +56,18 @@ class DomainIsCreatedListener
|
||||||
$createdDatabaseHost = null;
|
$createdDatabaseHost = null;
|
||||||
$createdDatabasePort = null;
|
$createdDatabasePort = null;
|
||||||
|
|
||||||
|
$databseType = 'sqlite';
|
||||||
|
$databasesAreCreated = false;
|
||||||
|
$shouldCreateMysqlDatabase = false;
|
||||||
|
|
||||||
|
|
||||||
|
$microweberSettingsFromPanel = setting('microweber');
|
||||||
|
|
||||||
|
if (isset($microweberSettingsFromPanel['database_driver']) && $microweberSettingsFromPanel['database_driver'] == 'mysql') {
|
||||||
|
$shouldCreateMysqlDatabase = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($shouldCreateMysqlDatabase) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$databaseUserPassword = Str::password(24);
|
$databaseUserPassword = Str::password(24);
|
||||||
|
@ -79,9 +91,22 @@ class DomainIsCreatedListener
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$databasesAreCreated = false;
|
$databasesAreCreated = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$installationType = 'symlink';
|
$installationType = 'symlink';
|
||||||
$installationLanguage = 'bg';
|
$installationLanguage = 'en';
|
||||||
|
$website_manager_url = 'https://microweber.com';
|
||||||
|
|
||||||
|
//$installationTemplate = 'default';
|
||||||
|
|
||||||
|
|
||||||
|
if (isset($microweberSettingsFromPanel['default_installation_type']) && $microweberSettingsFromPanel['default_installation_type'] == 'standalone') {
|
||||||
|
$installationType = 'standalone';
|
||||||
|
}
|
||||||
|
if (isset($microweberSettingsFromPanel['website_manager_url']) && $microweberSettingsFromPanel['website_manager_url']) {
|
||||||
|
$website_manager_url = $microweberSettingsFromPanel['website_manager_url'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// dd(setting('microweber'));
|
||||||
|
|
||||||
$install = new \MicroweberPackages\SharedServerScripts\MicroweberInstaller();
|
$install = new \MicroweberPackages\SharedServerScripts\MicroweberInstaller();
|
||||||
$install->setChownUser($findDomain->domain_username);
|
$install->setChownUser($findDomain->domain_username);
|
||||||
|
@ -93,7 +118,12 @@ class DomainIsCreatedListener
|
||||||
$install->setLanguage($installationLanguage);
|
$install->setLanguage($installationLanguage);
|
||||||
|
|
||||||
//$install->setStandaloneInstallation();
|
//$install->setStandaloneInstallation();
|
||||||
|
if($installationType == 'symlink') {
|
||||||
$install->setSymlinkInstallation();
|
$install->setSymlinkInstallation();
|
||||||
|
} else {
|
||||||
|
$install->setStandaloneInstallation();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($databasesAreCreated) {
|
if ($databasesAreCreated) {
|
||||||
$install->setDatabaseDriver('mysql');
|
$install->setDatabaseDriver('mysql');
|
||||||
|
@ -114,7 +144,7 @@ class DomainIsCreatedListener
|
||||||
if (isset($status['success']) && $status['success']) {
|
if (isset($status['success']) && $status['success']) {
|
||||||
|
|
||||||
$whiteLabelSettings = [];
|
$whiteLabelSettings = [];
|
||||||
$whiteLabelSettings['website_manager_url'] = 'https://microweber.com';
|
$whiteLabelSettings['website_manager_url'] = $website_manager_url;
|
||||||
|
|
||||||
$whitelabel = new MicroweberWhitelabelSettingsUpdater();
|
$whitelabel = new MicroweberWhitelabelSettingsUpdater();
|
||||||
$whitelabel->setPath($findDomain->domain_public);
|
$whitelabel->setPath($findDomain->domain_public);
|
||||||
|
|
Loading…
Reference in a new issue