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:
Michael Kaufmann
2022-05-02 19:16:58 +02:00
parent c4a2d87d70
commit f8386062cf
9 changed files with 117 additions and 64 deletions

View File

@@ -23,29 +23,29 @@
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
use Froxlor\Froxlor;
return [
'install' => [
'title' => lng('admin.admin_add'),
'image' => 'fa-solid fa-user-plus',
'self_overview' => ['section' => 'admins', 'page' => 'admins'],
'title' => 'install',
'sections' => [
'step1' => [
'title' => lng('install.database.title'),
'fields' => [
'mysql_host' => [
'label' => lng('mysql_host'),
'label' => lng('mysql.mysql_server'),
'type' => 'text',
'mandatory' => true,
'value' => old('mysql_host', 'localhost', 'installation')
],
'mysql_root_user' => [
'label' => lng('mysql_root_user'),
'label' => lng('mysql.privileged_user'),
'type' => 'text',
'mandatory' => true,
'value' => old('mysql_root_user', 'froxroot', 'installation'),
'next_to' => [
'mysql_root_pass' => [
'label' => lng('mysql_root_pass'),
'label' => lng('login.password'),
'type' => 'password',
'mandatory' => true,
'value' => old('mysql_root_pass', null, 'installation'),
@@ -53,13 +53,13 @@ return [
]
],
'mysql_unprivileged_user' => [
'label' => lng('mysql_unprivileged_user'),
'label' => lng('install.database.user'),
'type' => 'text',
'mandatory' => true,
'value' => old('mysql_unprivileged_user', 'froxlor', 'installation'),
'next_to' => [
'mysql_unprivileged_pass' => [
'label' => lng('mysql_unprivileged_pass'),
'label' => lng('login.password'),
'type' => 'password',
'mandatory' => true,
'value' => old('mysql_unprivileged_pass', null, 'installation'),
@@ -67,48 +67,42 @@ return [
]
],
'mysql_database' => [
'label' => lng('mysql_database'),
'label' => lng('install.database.dbname'),
'type' => 'text',
'mandatory' => true,
'value' => old('mysql_database', 'froxlor', 'installation'),
],
'mysql_force_create' => [
'label' => lng('mysql_force_create'),
'label' => lng('install.database.force_create'),
'type' => 'checkbox',
'value' => '1',
'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' => [
'title' => lng('install.admin.title'),
'fields' => [
'admin_name' => [
'label' => lng('admin_name'),
'label' => lng('customer.name'),
'type' => 'text',
'mandatory' => true,
'value' => old('admin_name', 'Administrator', 'installation'),
],
'admin_user' => [
'label' => lng('admin_user'),
'label' => lng('login.username'),
'type' => 'text',
'mandatory' => true,
'value' => old('admin_user', 'admin', 'installation'),
],
'admin_pass' => [
'label' => lng('admin_pass'),
'label' => lng('login.password'),
'type' => 'password',
'mandatory' => true,
'value' => old('admin_pass', null, 'installation'),
],
'admin_email' => [
'label' => lng('admin_email'),
'label' => lng('customer.email'),
'type' => 'text',
'mandatory' => true,
'value' => old('admin_email', null, 'installation'),
@@ -119,55 +113,56 @@ return [
'title' => lng('install.system.title'),
'fields' => [
'distribution' => [
'label' => lng('distribution'),
'label' => lng('admin.configfiles.distribution'),
'type' => 'select',
'mandatory' => true,
'select_var' => $this->supportedOS,
],
'serverip' => [
'label' => lng('serverip'),
'label' => lng('serversettings.ipaddress.title'),
'type' => 'text',
'mandatory' => true,
'value' => old('serverip', null, 'installation'),
],
'servername' => [
'label' => lng('servername'),
'label' => lng('install.system.servername'),
'type' => 'text',
'mandatory' => true,
'value' => old('servername', null, 'installation'),
],
'use_ssl' => [
'label' => lng('use_ssl'),
'label' => lng('serversettings.ssl.use_ssl.title'),
'type' => 'checkbox',
'value' => '1',
'checked' => old('use_ssl', '1', 'installation'),
],
'webserver' => [
'label' => lng('webserver'),
'type' => 'text',
'label' => lng('admin.webserver'),
'type' => 'select',
'mandatory' => true,
'select_var' => ['apache24' => 'Apache 2.4', 'nginx' => 'Nginx', 'lighttpd' => 'LigHTTPd'],
'value' => old('webserver', 'apache24', 'installation'),
],
'webserver_backend' => [
'label' => lng('webserver_backend'),
'label' => lng('install.system.phpbackend'),
'type' => 'select',
'mandatory' => true,
'select_var' => $this->webserverBackend,
],
'httpuser' => [
'label' => lng('httpuser'),
'label' => lng('admin.webserver_user'),
'type' => 'text',
'mandatory' => true,
'value' => old('httpuser', 'www-data', 'installation'),
],
'httpgroup' => [
'label' => lng('httpgroup'),
'label' => lng('admin.webserver_group'),
'type' => 'text',
'mandatory' => true,
'value' => old('httpgroup', 'www-data', 'installation'),
],
'activate_newsfeed' => [
'label' => lng('activate_newsfeed'),
'label' => lng('install.system.activate_newsfeed'),
'type' => 'checkbox',
'value' => '1',
'checked' => false
@@ -178,9 +173,9 @@ return [
'title' => lng('install.system.title'),
'fields' => [
'system' => [
'label' => lng('install.system.system'),
'label' => lng('install.install.runcmd'),
'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,
'rows' => 1
],