create self-signed certificate as last fallback if system-wide cert/key file cannot be found; add english translations for installation (wip)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -36,6 +36,7 @@ use Froxlor\Http\Statistics;
|
|||||||
use Froxlor\PhpHelper;
|
use Froxlor\PhpHelper;
|
||||||
use Froxlor\Settings;
|
use Froxlor\Settings;
|
||||||
use Froxlor\Validate\Validate;
|
use Froxlor\Validate\Validate;
|
||||||
|
use Froxlor\System\Crypt;
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -351,9 +352,8 @@ class Apache extends HttpConfigBase
|
|||||||
if (($row_ipsandports['ssl_cert_file'] == '' || !file_exists($row_ipsandports['ssl_cert_file'])) && (Settings::Get('system.le_froxlor_enabled') == '0' || $this->froxlorVhostHasLetsEncryptCert() == false)) {
|
if (($row_ipsandports['ssl_cert_file'] == '' || !file_exists($row_ipsandports['ssl_cert_file'])) && (Settings::Get('system.le_froxlor_enabled') == '0' || $this->froxlorVhostHasLetsEncryptCert() == false)) {
|
||||||
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
||||||
if (!file_exists($row_ipsandports['ssl_cert_file'])) {
|
if (!file_exists($row_ipsandports['ssl_cert_file'])) {
|
||||||
// explicitly disable ssl for this vhost
|
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_DEBUG, 'System certificate file "' . Settings::Get('system.ssl_cert_file') . '" does not seem to exist. Creating self-signed certificate...');
|
||||||
$row_ipsandports['ssl_cert_file'] = "";
|
Crypt::createSelfSignedCertificate();
|
||||||
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_DEBUG, 'System certificate file "' . Settings::Get('system.ssl_cert_file') . '" does not seem to exist. Disabling SSL-vhost for "' . Settings::Get('system.hostname') . '"');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ use Froxlor\Http\Directory;
|
|||||||
use Froxlor\Http\Statistics;
|
use Froxlor\Http\Statistics;
|
||||||
use Froxlor\Settings;
|
use Froxlor\Settings;
|
||||||
use Froxlor\Validate\Validate;
|
use Froxlor\Validate\Validate;
|
||||||
|
use Froxlor\System\Crypt;
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -212,9 +213,16 @@ class Lighttpd extends HttpConfigBase
|
|||||||
if (($row_ipsandports['ssl_cert_file'] == '' || !file_exists($row_ipsandports['ssl_cert_file'])) && (Settings::Get('system.le_froxlor_enabled') == '0' || $this->froxlorVhostHasLetsEncryptCert() == false)) {
|
if (($row_ipsandports['ssl_cert_file'] == '' || !file_exists($row_ipsandports['ssl_cert_file'])) && (Settings::Get('system.le_froxlor_enabled') == '0' || $this->froxlorVhostHasLetsEncryptCert() == false)) {
|
||||||
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
||||||
if (!file_exists($row_ipsandports['ssl_cert_file'])) {
|
if (!file_exists($row_ipsandports['ssl_cert_file'])) {
|
||||||
|
$this->logger->logAction(FroxlorLogger::CRON_ACTION, LOG_DEBUG, 'System certificate file "' . Settings::Get('system.ssl_cert_file') . '" does not seem to exist. Creating self-signed certificate...');
|
||||||
|
Crypt::createSelfSignedCertificate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($row_ipsandports['ssl_key_file'] == '') {
|
||||||
|
$row_ipsandports['ssl_key_file'] = Settings::Get('system.ssl_key_file');
|
||||||
|
if (!file_exists($row_ipsandports['ssl_key_file'])) {
|
||||||
// explicitly disable ssl for this vhost
|
// explicitly disable ssl for this vhost
|
||||||
$row_ipsandports['ssl_cert_file'] = "";
|
$row_ipsandports['ssl_cert_file'] = "";
|
||||||
$this->logger->logAction(FroxlorLogger::CRON_ACTION, LOG_DEBUG, 'System certificate file "' . Settings::Get('system.ssl_cert_file') . '" does not seem to exist. Disabling SSL-vhost for "' . Settings::Get('system.hostname') . '"');
|
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_DEBUG, 'System certificate key-file "' . Settings::Get('system.ssl_key_file') . '" does not seem to exist. Disabling SSL-vhost for "' . Settings::Get('system.hostname') . '"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ use Froxlor\Http\Directory;
|
|||||||
use Froxlor\Http\Statistics;
|
use Froxlor\Http\Statistics;
|
||||||
use Froxlor\Settings;
|
use Froxlor\Settings;
|
||||||
use Froxlor\Validate\Validate;
|
use Froxlor\Validate\Validate;
|
||||||
|
use Froxlor\System\Crypt;
|
||||||
use PDO;
|
use PDO;
|
||||||
|
|
||||||
class Nginx extends HttpConfigBase
|
class Nginx extends HttpConfigBase
|
||||||
@@ -110,9 +111,8 @@ class Nginx extends HttpConfigBase
|
|||||||
if (($row_ipsandports['ssl_cert_file'] == '' || !file_exists($row_ipsandports['ssl_cert_file'])) && (Settings::Get('system.le_froxlor_enabled') == '0' || $this->froxlorVhostHasLetsEncryptCert() == false)) {
|
if (($row_ipsandports['ssl_cert_file'] == '' || !file_exists($row_ipsandports['ssl_cert_file'])) && (Settings::Get('system.le_froxlor_enabled') == '0' || $this->froxlorVhostHasLetsEncryptCert() == false)) {
|
||||||
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
$row_ipsandports['ssl_cert_file'] = Settings::Get('system.ssl_cert_file');
|
||||||
if (!file_exists($row_ipsandports['ssl_cert_file'])) {
|
if (!file_exists($row_ipsandports['ssl_cert_file'])) {
|
||||||
// explicitly disable ssl for this vhost
|
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_DEBUG, 'System certificate file "' . Settings::Get('system.ssl_cert_file') . '" does not seem to exist. Creating self-signed certificate...');
|
||||||
$row_ipsandports['ssl_cert_file'] = "";
|
Crypt::createSelfSignedCertificate();
|
||||||
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_DEBUG, 'System certificate file "' . Settings::Get('system.ssl_cert_file') . '" does not seem to exist. Disabling SSL-vhost for "' . Settings::Get('system.hostname') . '"');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($row_ipsandports['ssl_key_file'] == '') {
|
if ($row_ipsandports['ssl_key_file'] == '') {
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ use Exception;
|
|||||||
use Froxlor\Install\Install\Core;
|
use Froxlor\Install\Install\Core;
|
||||||
use Froxlor\UI\Panel\UI;
|
use Froxlor\UI\Panel\UI;
|
||||||
use Froxlor\UI\Request;
|
use Froxlor\UI\Request;
|
||||||
|
use Froxlor\Config\ConfigParser;
|
||||||
|
|
||||||
class Install
|
class Install
|
||||||
{
|
{
|
||||||
@@ -42,18 +43,29 @@ class Install
|
|||||||
public array $suggestions = [];
|
public array $suggestions = [];
|
||||||
public array $criticals = [];
|
public array $criticals = [];
|
||||||
public array $loadedExtensions;
|
public array $loadedExtensions;
|
||||||
// TODO: add more os
|
public array $supportedOS = [];
|
||||||
public array $supportedOS = [
|
|
||||||
'focal' => 'Ubuntu 20.04 LTS (Focal Fossa)'
|
|
||||||
];
|
|
||||||
public array $webserverBackend = [
|
public array $webserverBackend = [
|
||||||
'php-fpm' => 'PHP-FPM',
|
'php-fpm' => 'PHP-FPM',
|
||||||
'fcgid' => 'FCGID',
|
'fcgid' => 'FCGID',
|
||||||
'none' => 'None',
|
'mod_php' => 'mod_php (not recommended)',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
// get all supported OS
|
||||||
|
// show list of available distro's
|
||||||
|
$distros = glob(dirname(__DIR__, 3) . '/lib/configfiles/*.xml');
|
||||||
|
$distributions_select[''] = '-';
|
||||||
|
// read in all the distros
|
||||||
|
foreach ($distros as $distribution) {
|
||||||
|
// get configparser object
|
||||||
|
$dist = new ConfigParser($distribution);
|
||||||
|
// store in tmp array
|
||||||
|
$this->supportedOS[str_replace(".xml", "", strtolower(basename($distribution)))] = $dist->getCompleteDistroName();
|
||||||
|
}
|
||||||
|
// sort by distribution name
|
||||||
|
asort($this->supportedOS);
|
||||||
|
|
||||||
// set formfield, so we can get the fields and steps etc.
|
// set formfield, so we can get the fields and steps etc.
|
||||||
$this->formfield = require dirname(__DIR__, 3) . '/lib/formfields/install/formfield.install.php';
|
$this->formfield = require dirname(__DIR__, 3) . '/lib/formfields/install/formfield.install.php';
|
||||||
|
|
||||||
@@ -180,10 +192,10 @@ class Install
|
|||||||
private function getInformationText(): string
|
private function getInformationText(): string
|
||||||
{
|
{
|
||||||
if (version_compare($this->requiredVersion, PHP_VERSION, "<")) {
|
if (version_compare($this->requiredVersion, PHP_VERSION, "<")) {
|
||||||
$text = 'Your system is running with PHP ' . $this->phpVersion;
|
$text = lng('install.phpinfosuccess', [$this->phpVersion]);
|
||||||
} else {
|
} else {
|
||||||
$text = 'Your system is running a lower version than PHP ' . $this->requiredVersion;
|
$text = lng('install.phpinfowarn', [$this->requiredVersion]);
|
||||||
$this->criticals[] = 'Update your current PHP Version from ' . $this->phpVersion . ' to ' . $this->requiredVersion . ' or higher';
|
$this->criticals[] = lng('install.phpinfoupdate', [$this->phpVersion, $this->requiredVersion]);
|
||||||
}
|
}
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,29 +23,29 @@
|
|||||||
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
|
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Froxlor\Froxlor;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'install' => [
|
'install' => [
|
||||||
'title' => lng('admin.admin_add'),
|
'title' => 'install',
|
||||||
'image' => 'fa-solid fa-user-plus',
|
|
||||||
'self_overview' => ['section' => 'admins', 'page' => 'admins'],
|
|
||||||
'sections' => [
|
'sections' => [
|
||||||
'step1' => [
|
'step1' => [
|
||||||
'title' => lng('install.database.title'),
|
'title' => lng('install.database.title'),
|
||||||
'fields' => [
|
'fields' => [
|
||||||
'mysql_host' => [
|
'mysql_host' => [
|
||||||
'label' => lng('mysql_host'),
|
'label' => lng('mysql.mysql_server'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('mysql_host', 'localhost', 'installation')
|
'value' => old('mysql_host', 'localhost', 'installation')
|
||||||
],
|
],
|
||||||
'mysql_root_user' => [
|
'mysql_root_user' => [
|
||||||
'label' => lng('mysql_root_user'),
|
'label' => lng('mysql.privileged_user'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('mysql_root_user', 'froxroot', 'installation'),
|
'value' => old('mysql_root_user', 'froxroot', 'installation'),
|
||||||
'next_to' => [
|
'next_to' => [
|
||||||
'mysql_root_pass' => [
|
'mysql_root_pass' => [
|
||||||
'label' => lng('mysql_root_pass'),
|
'label' => lng('login.password'),
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('mysql_root_pass', null, 'installation'),
|
'value' => old('mysql_root_pass', null, 'installation'),
|
||||||
@@ -53,13 +53,13 @@ return [
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
'mysql_unprivileged_user' => [
|
'mysql_unprivileged_user' => [
|
||||||
'label' => lng('mysql_unprivileged_user'),
|
'label' => lng('install.database.user'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('mysql_unprivileged_user', 'froxlor', 'installation'),
|
'value' => old('mysql_unprivileged_user', 'froxlor', 'installation'),
|
||||||
'next_to' => [
|
'next_to' => [
|
||||||
'mysql_unprivileged_pass' => [
|
'mysql_unprivileged_pass' => [
|
||||||
'label' => lng('mysql_unprivileged_pass'),
|
'label' => lng('login.password'),
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('mysql_unprivileged_pass', null, 'installation'),
|
'value' => old('mysql_unprivileged_pass', null, 'installation'),
|
||||||
@@ -67,48 +67,42 @@ return [
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
'mysql_database' => [
|
'mysql_database' => [
|
||||||
'label' => lng('mysql_database'),
|
'label' => lng('install.database.dbname'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('mysql_database', 'froxlor', 'installation'),
|
'value' => old('mysql_database', 'froxlor', 'installation'),
|
||||||
],
|
],
|
||||||
'mysql_force_create' => [
|
'mysql_force_create' => [
|
||||||
'label' => lng('mysql_force_create'),
|
'label' => lng('install.database.force_create'),
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'value' => '1',
|
'value' => '1',
|
||||||
'checked' => old('mysql_force_create', '0', 'installation')
|
'checked' => old('mysql_force_create', '0', 'installation')
|
||||||
],
|
],
|
||||||
'mysql_access_host' => [
|
|
||||||
'label' => lng('mysql_access_host'),
|
|
||||||
'type' => 'text',
|
|
||||||
'mandatory' => true,
|
|
||||||
'value' => old('mysql_access_host', '127.0.0.1,localhost', 'installation'),
|
|
||||||
],
|
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'step2' => [
|
'step2' => [
|
||||||
'title' => lng('install.admin.title'),
|
'title' => lng('install.admin.title'),
|
||||||
'fields' => [
|
'fields' => [
|
||||||
'admin_name' => [
|
'admin_name' => [
|
||||||
'label' => lng('admin_name'),
|
'label' => lng('customer.name'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('admin_name', 'Administrator', 'installation'),
|
'value' => old('admin_name', 'Administrator', 'installation'),
|
||||||
],
|
],
|
||||||
'admin_user' => [
|
'admin_user' => [
|
||||||
'label' => lng('admin_user'),
|
'label' => lng('login.username'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('admin_user', 'admin', 'installation'),
|
'value' => old('admin_user', 'admin', 'installation'),
|
||||||
],
|
],
|
||||||
'admin_pass' => [
|
'admin_pass' => [
|
||||||
'label' => lng('admin_pass'),
|
'label' => lng('login.password'),
|
||||||
'type' => 'password',
|
'type' => 'password',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('admin_pass', null, 'installation'),
|
'value' => old('admin_pass', null, 'installation'),
|
||||||
],
|
],
|
||||||
'admin_email' => [
|
'admin_email' => [
|
||||||
'label' => lng('admin_email'),
|
'label' => lng('customer.email'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('admin_email', null, 'installation'),
|
'value' => old('admin_email', null, 'installation'),
|
||||||
@@ -119,55 +113,56 @@ return [
|
|||||||
'title' => lng('install.system.title'),
|
'title' => lng('install.system.title'),
|
||||||
'fields' => [
|
'fields' => [
|
||||||
'distribution' => [
|
'distribution' => [
|
||||||
'label' => lng('distribution'),
|
'label' => lng('admin.configfiles.distribution'),
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'select_var' => $this->supportedOS,
|
'select_var' => $this->supportedOS,
|
||||||
],
|
],
|
||||||
'serverip' => [
|
'serverip' => [
|
||||||
'label' => lng('serverip'),
|
'label' => lng('serversettings.ipaddress.title'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('serverip', null, 'installation'),
|
'value' => old('serverip', null, 'installation'),
|
||||||
],
|
],
|
||||||
'servername' => [
|
'servername' => [
|
||||||
'label' => lng('servername'),
|
'label' => lng('install.system.servername'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('servername', null, 'installation'),
|
'value' => old('servername', null, 'installation'),
|
||||||
],
|
],
|
||||||
'use_ssl' => [
|
'use_ssl' => [
|
||||||
'label' => lng('use_ssl'),
|
'label' => lng('serversettings.ssl.use_ssl.title'),
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'value' => '1',
|
'value' => '1',
|
||||||
'checked' => old('use_ssl', '1', 'installation'),
|
'checked' => old('use_ssl', '1', 'installation'),
|
||||||
],
|
],
|
||||||
'webserver' => [
|
'webserver' => [
|
||||||
'label' => lng('webserver'),
|
'label' => lng('admin.webserver'),
|
||||||
'type' => 'text',
|
'type' => 'select',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
|
'select_var' => ['apache24' => 'Apache 2.4', 'nginx' => 'Nginx', 'lighttpd' => 'LigHTTPd'],
|
||||||
'value' => old('webserver', 'apache24', 'installation'),
|
'value' => old('webserver', 'apache24', 'installation'),
|
||||||
],
|
],
|
||||||
'webserver_backend' => [
|
'webserver_backend' => [
|
||||||
'label' => lng('webserver_backend'),
|
'label' => lng('install.system.phpbackend'),
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'select_var' => $this->webserverBackend,
|
'select_var' => $this->webserverBackend,
|
||||||
],
|
],
|
||||||
'httpuser' => [
|
'httpuser' => [
|
||||||
'label' => lng('httpuser'),
|
'label' => lng('admin.webserver_user'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('httpuser', 'www-data', 'installation'),
|
'value' => old('httpuser', 'www-data', 'installation'),
|
||||||
],
|
],
|
||||||
'httpgroup' => [
|
'httpgroup' => [
|
||||||
'label' => lng('httpgroup'),
|
'label' => lng('admin.webserver_group'),
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'value' => old('httpgroup', 'www-data', 'installation'),
|
'value' => old('httpgroup', 'www-data', 'installation'),
|
||||||
],
|
],
|
||||||
'activate_newsfeed' => [
|
'activate_newsfeed' => [
|
||||||
'label' => lng('activate_newsfeed'),
|
'label' => lng('install.system.activate_newsfeed'),
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'value' => '1',
|
'value' => '1',
|
||||||
'checked' => false
|
'checked' => false
|
||||||
@@ -178,9 +173,9 @@ return [
|
|||||||
'title' => lng('install.system.title'),
|
'title' => lng('install.system.title'),
|
||||||
'fields' => [
|
'fields' => [
|
||||||
'system' => [
|
'system' => [
|
||||||
'label' => lng('install.system.system'),
|
'label' => lng('install.install.runcmd'),
|
||||||
'type' => 'textarea',
|
'type' => 'textarea',
|
||||||
'value' => '/var/www/html/froxlor/bin/froxlor-cli cron --force',
|
'value' => Froxlor::getInstallDir().'bin/froxlor-cli froxlor:config-services -a [JSON PARAMETER] --yes-to-all',
|
||||||
'readonly' => true,
|
'readonly' => true,
|
||||||
'rows' => 1
|
'rows' => 1
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1368,6 +1368,7 @@ Yours sincerely, your administrator',
|
|||||||
'mysql_server' => 'MySQL-Server',
|
'mysql_server' => 'MySQL-Server',
|
||||||
'database_edit' => 'Edit database',
|
'database_edit' => 'Edit database',
|
||||||
'size' => 'Size',
|
'size' => 'Size',
|
||||||
|
'privileged_user' => 'Privileged database user',
|
||||||
],
|
],
|
||||||
'opcacheinfo' => [
|
'opcacheinfo' => [
|
||||||
'generaltitle' => 'General Information',
|
'generaltitle' => 'General Information',
|
||||||
@@ -2453,9 +2454,41 @@ Yours sincerely, your administrator',
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
'install' => [
|
'install' => [
|
||||||
|
'slogal' => 'froxlor Server Management Panel',
|
||||||
|
'preflight' => 'System check',
|
||||||
|
'critical_error' => 'Critical error',
|
||||||
|
'suggestions' => 'Not required but recommended',
|
||||||
|
'phpinfosuccess' => 'Your system is running with PHP %s',
|
||||||
|
'phpinfowarn' => 'Your system is running a lower version than PHP %s',
|
||||||
|
'phpinfoupdate' => 'Update your current PHP Version from %s to %s or higher',
|
||||||
|
'start_installation' => 'Start installation',
|
||||||
|
'check_again' => 'Reload to check again',
|
||||||
'dependency_check' => [
|
'dependency_check' => [
|
||||||
'title' => 'Welcome to froxlor',
|
'title' => 'Welcome to froxlor',
|
||||||
'description' => 'We check the system for dependencies to ensure that all required php extensions and modules are enabled so that froxlor runs properly.',
|
'description' => 'We check the system for dependencies to ensure that all required php extensions and modules are enabled so that froxlor runs properly.',
|
||||||
],
|
],
|
||||||
|
'database' => [
|
||||||
|
'top' => 'Database',
|
||||||
|
'title' => 'Froxlor requires a database and additionally a privileged user to be able to create users and databases (GRANT option). The given database and unprivileged database-user will be created in this process. The privileged user must exist.',
|
||||||
|
'user' => 'Unprivileged database user',
|
||||||
|
'dbname' => 'Database name',
|
||||||
|
'force_create' => 'Backup and overwrite database if exists?',
|
||||||
|
],
|
||||||
|
'admin' => [
|
||||||
|
'top' => 'Admin user',
|
||||||
|
'title' => 'Let\'s create the main administrator user. This user has all privileges to adjust settings and add/update/delete resources like customers, domains, etc.',
|
||||||
|
],
|
||||||
|
'system' => [
|
||||||
|
'top' => 'System setup',
|
||||||
|
'title' => 'Set your environment as well as server relevant data and options here to let froxlor know about your system. These values are crucial for the system configuration and operating.',
|
||||||
|
'servername' => 'Server name (FQDN, no ip-address)',
|
||||||
|
'phpbackend' => 'PHP backend',
|
||||||
|
'activate_newsfeed' => 'Enable the official newsfeed<br><small>(https://inside.froxlor.org/news/)</small>',
|
||||||
|
],
|
||||||
|
'install' => [
|
||||||
|
'top' => 'Finish setup',
|
||||||
|
'title' => '@todo description',
|
||||||
|
'runcmd' => 'Run the following command as root-user in your shell on this server to install/configure all services',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
{% macro field(id, field, norow = true, nohide = false, em = false) %}
|
{% macro field(id, field, norow = true, nohide = false, em = false) %}
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="{{ id }}" class="form-label">{{ field.label }}</label>
|
<label for="{{ id }}" class="form-label">{{ field.label|raw }}</label>
|
||||||
{{ _self.fieldrow(id, field, norow, nohide, em) }}
|
{{ _self.fieldrow(id, field, norow, nohide, em) }}
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container max-w-lg flex align-content-center mt-5">
|
<div class="container max-w-lg flex align-content-center mt-5">
|
||||||
<img src="{{ basehref|default('') }}templates/Froxlor/assets/img/logo.png" class="mb-5" alt="{{ lng('slogan') }}"/>
|
<img src="{{ basehref|default('') }}templates/Froxlor/assets/img/logo.png" class="mb-5" alt="{{ lng('install.slogan') }}"/>
|
||||||
|
|
||||||
{% if error is not null %}
|
{% if error is not null %}
|
||||||
<div class="alert alert-danger mb-4">{{ error }}</div>
|
<div class="alert alert-danger mb-4">{{ error }}</div>
|
||||||
@@ -11,23 +11,23 @@
|
|||||||
<div class="row text-center gx-0">
|
<div class="row text-center gx-0">
|
||||||
<div class="col p-3{{ setup.step == 0 ? ' bg-white shadow rounded-top' : '' }}">
|
<div class="col p-3{{ setup.step == 0 ? ' bg-white shadow rounded-top' : '' }}">
|
||||||
<i class="far fa-circle{{ setup.step > 0 ? '-check' : '' }}"></i>
|
<i class="far fa-circle{{ setup.step > 0 ? '-check' : '' }}"></i>
|
||||||
{% if setup.step > 0 %}<a href="?step=0" class="text-decoration-none">{{ lng('preflight') }}</a>{% else %}{{ lng('preflight') }}{% endif %}
|
{% if setup.step > 0 %}<a href="?step=0" class="text-decoration-none">{{ lng('install.preflight') }}</a>{% else %}{{ lng('install.preflight') }}{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col p-3{{ setup.step == 1 ? ' bg-white shadow rounded-top' : '' }}">
|
<div class="col p-3{{ setup.step == 1 ? ' bg-white shadow rounded-top' : '' }}">
|
||||||
<i class="far fa-circle{{ setup.step > 1 ? '-check' : '' }}"></i>
|
<i class="far fa-circle{{ setup.step > 1 ? '-check' : '' }}"></i>
|
||||||
{% if setup.step > 1 %}<a href="?step=1" class="text-decoration-none">{{ lng('database') }}</a>{% else %}{{ lng('database') }}{% endif %}
|
{% if setup.step > 1 %}<a href="?step=1" class="text-decoration-none">{{ lng('install.database.top') }}</a>{% else %}{{ lng('install.database.top') }}{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col p-3{{ setup.step == 2 ? ' bg-white shadow rounded-top' : '' }}">
|
<div class="col p-3{{ setup.step == 2 ? ' bg-white shadow rounded-top' : '' }}">
|
||||||
<i class="far fa-circle{{ setup.step > 2 ? '-check' : '' }}"></i>
|
<i class="far fa-circle{{ setup.step > 2 ? '-check' : '' }}"></i>
|
||||||
{% if setup.step > 2 %}<a href="?step=2" class="text-decoration-none">{{ lng('admin') }}</a>{% else %}{{ lng('admin') }}{% endif %}
|
{% if setup.step > 2 %}<a href="?step=2" class="text-decoration-none">{{ lng('install.admin.top') }}</a>{% else %}{{ lng('install.admin.top') }}{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col p-3{{ setup.step == 3 ? ' bg-white shadow rounded-top' : '' }}">
|
<div class="col p-3{{ setup.step == 3 ? ' bg-white shadow rounded-top' : '' }}">
|
||||||
<i class="far fa-circle{{ setup.step > 3 ? '-check' : '' }}"></i>
|
<i class="far fa-circle{{ setup.step > 3 ? '-check' : '' }}"></i>
|
||||||
{% if setup.step > 3 %}<a href="?step=3" class="text-decoration-none">{{ lng('system') }}</a>{% else %}{{ lng('system') }}{% endif %}
|
{% if setup.step > 3 %}<a href="?step=3" class="text-decoration-none">{{ lng('install.system.top') }}</a>{% else %}{{ lng('install.system.top') }}{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col p-3{{ setup.step == 4 ? ' bg-white shadow rounded-top' : '' }}">
|
<div class="col p-3{{ setup.step == 4 ? ' bg-white shadow rounded-top' : '' }}">
|
||||||
<i class="far fa-circle{{ setup.step > 4 ? '-check' : '' }}"></i>
|
<i class="far fa-circle{{ setup.step > 4 ? '-check' : '' }}"></i>
|
||||||
{% if setup.step > 4 %}<a href="?step=4" class="text-decoration-none">{{ lng('install') }}</a>{% else %}{{ lng('install') }}{% endif %}
|
{% if setup.step > 4 %}<a href="?step=4" class="text-decoration-none">{{ lng('install.install.top') }}</a>{% else %}{{ lng('install.install.top') }}{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -45,20 +45,20 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-between mt-4">
|
<div class="d-flex justify-content-between mt-4">
|
||||||
<a href="?step={{ setup.step - 1 }}" class="btn btn-secondary">« {{ lng('back') }}</a>
|
<a href="?step={{ setup.step - 1 }}" class="btn btn-secondary">« {{ lng('panel.back') }}</a>
|
||||||
<button type="submit" name="submit" class="btn btn-primary">{{ lng('next') }} »</button>
|
<button type="submit" name="submit" class="btn btn-primary">{{ lng('panel.next') }} »</button>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h4 class="mb-3">{{ lng('install.dependency_check.title') }}</h4>
|
<h4 class="mb-3">{{ lng('install.dependency_check.title') }}</h4>
|
||||||
<p class="lead">{{ lng('install.dependency_check.description') }}</p>
|
<p class="lead">{{ lng('install.dependency_check.description') }}</p>
|
||||||
|
|
||||||
<p class="lead {{ preflight.criticals ? 'text-danger' : preflight.suggestions ? 'text-warning' : 'text-success'}}">
|
<p class="lead {{ preflight.criticals ? 'text-danger' : preflight.suggestions ? 'text-warning' : 'text-success'}}">
|
||||||
<i class="{{ preflight.criticals ? 'fa fa-triangle-exclamation' : preflight.suggestions ? 'fa-circle-info' : 'far fa-circle-check' }}"></i>
|
<i class="{{ preflight.criticals ? 'fa fa-triangle-exclamation' : preflight.suggestions ? 'fa fa-circle-info' : 'far fa-circle-check' }}"></i>
|
||||||
{{ preflight.text }}
|
{{ preflight.text }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% if preflight.criticals %}
|
{% if preflight.criticals %}
|
||||||
<p class="text-muted">{{ lng('critical_error') }}</p>
|
<p class="text-muted">{{ lng('install.critical_error') }}</p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for critical in preflight.criticals %}
|
{% for critical in preflight.criticals %}
|
||||||
<li>{{ critical|json_encode }}</li>
|
<li>{{ critical|json_encode }}</li>
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if preflight.suggestions %}
|
{% if preflight.suggestions %}
|
||||||
<p class="text-muted">{{ lng('suggestions') }}</p>
|
<p class="text-muted">{{ lng('install.suggestions') }}</p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for suggestion in preflight.suggestions %}
|
{% for suggestion in preflight.suggestions %}
|
||||||
<li>{{ suggestion|json_encode }}</li>
|
<li>{{ suggestion|json_encode }}</li>
|
||||||
@@ -76,10 +76,10 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mt-4">
|
<div class="d-flex justify-content-end mt-4">
|
||||||
{% if preflight.criticals or preflight.suggestions %}
|
{% if preflight.criticals %}
|
||||||
<a href="" class="btn btn-secondary"><i class="fa fa-arrow-rotate-left"></i> {{ lng('check_again') }}</a>
|
<a href="" class="btn btn-secondary"><i class="fa fa-arrow-rotate-left"></i> {{ lng('install.check_again') }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="?step=1" class="btn btn-primary">{{ lng('start_installation') }}</a>
|
<a href="?step=1" class="btn btn-primary">{{ lng('install.start_installation') }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -56,14 +56,19 @@ $(function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* email only domain - hide unnecessary/unused sections
|
||||||
|
*/
|
||||||
if ($('#id') && $('#email_only').is(':checked')) {
|
if ($('#id') && $('#email_only').is(':checked')) {
|
||||||
// hide unnecessary sections
|
|
||||||
$('#section_b').hide();
|
$('#section_b').hide();
|
||||||
$('#section_bssl').hide();
|
$('#section_bssl').hide();
|
||||||
$('#section_c').hide();
|
$('#section_c').hide();
|
||||||
$('#section_d').hide();
|
$('#section_d').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* toggle show/hide of sections in case of email only flag
|
||||||
|
*/
|
||||||
$('#email_only').on('click', function () {
|
$('#email_only').on('click', function () {
|
||||||
if ($(this).is(':checked')) {
|
if ($(this).is(':checked')) {
|
||||||
// hide unnecessary sections
|
// hide unnecessary sections
|
||||||
|
|||||||
Reference in New Issue
Block a user