set file-log (if enabled) to be in froxlor/logs/ folder; fix ssl param directive for dovecot in Ubuntu Bionic; set version to 2.0.8

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-01-14 13:09:42 +01:00
parent 529890b5d2
commit 090cfc26f2
7 changed files with 34 additions and 12 deletions

View File

@@ -696,7 +696,7 @@ opcache.validate_timestamps'),
('system', 'distribution', ''), ('system', 'distribution', ''),
('system', 'update_channel', 'stable'), ('system', 'update_channel', 'stable'),
('system', 'updatecheck_data', ''), ('system', 'updatecheck_data', ''),
('system', 'update_notify_last', '2.0.7'), ('system', 'update_notify_last', '2.0.8'),
('system', 'traffictool', 'goaccess'), ('system', 'traffictool', 'goaccess'),
('api', 'enabled', '0'), ('api', 'enabled', '0'),
('2fa', 'enabled', '1'), ('2fa', 'enabled', '1'),
@@ -740,7 +740,7 @@ opcache.validate_timestamps'),
('panel', 'logo_overridetheme', '0'), ('panel', 'logo_overridetheme', '0'),
('panel', 'logo_overridecustom', '0'), ('panel', 'logo_overridecustom', '0'),
('panel', 'settings_mode', '0'), ('panel', 'settings_mode', '0'),
('panel', 'version', '2.0.7'), ('panel', 'version', '2.0.8'),
('panel', 'db_version', '202301120'); ('panel', 'db_version', '202301120');

View File

@@ -330,3 +330,17 @@ if (Froxlor::isDatabaseVersion('202212060')) {
Froxlor::updateToDbVersion('202301120'); Froxlor::updateToDbVersion('202301120');
} }
if (Froxlor::isFroxlorVersion('2.0.7')) {
Update::showUpdateStep("Updating from 2.0.7 to 2.0.8", false);
// adjust file-logging to be set to froxlor/logs/
$logtypes = explode(',', Settings::Get('logger.logtypes'));
if (in_array('file', $logtypes)) {
Update::showUpdateStep("Adjusting froxlor logfile for system-logging to be stored in logs/froxlor.log");
Settings::Set('logger.logfile', 'froxlor.log');
Update::lastStepStatus(0);
}
Froxlor::updateToVersion('2.0.8');
}

View File

@@ -31,7 +31,7 @@ final class Froxlor
{ {
// Main version variable // Main version variable
const VERSION = '2.0.7'; const VERSION = '2.0.8';
// Database version (YYYYMMDDC where C is a daily counter) // Database version (YYYYMMDDC where C is a daily counter)
const DBVERSION = '202301120'; const DBVERSION = '202301120';

View File

@@ -100,11 +100,17 @@ class FroxlorLogger
self::$ml->pushHandler(new SyslogHandler('froxlor', LOG_USER, Logger::DEBUG)); self::$ml->pushHandler(new SyslogHandler('froxlor', LOG_USER, Logger::DEBUG));
break; break;
case 'file': case 'file':
$logger_logfile = Settings::Get('logger.logfile'); $logger_logfile = FileDir::makeCorrectFile(Froxlor::getInstallDir() . '/logs/' . Settings::Get('logger.logfile'));
// is_writable needs an existing file to check if it's actually writable // is_writable needs an existing file to check if it's actually writable
@touch($logger_logfile); @touch($logger_logfile);
if (empty($logger_logfile) || !is_writable($logger_logfile)) { if (empty($logger_logfile) || !is_writable($logger_logfile)) {
Settings::Set('logger.logfile', '/tmp/froxlor.log'); Settings::Set('logger.logfile', 'froxlor.log');
$logger_logfile = FileDir::makeCorrectFile(Froxlor::getInstallDir() . '/logs/froxlor.log');
@touch($logger_logfile);
if (empty($logger_logfile) || !is_writable($logger_logfile)) {
// not writable in our own directory? Skip
break;
}
} }
self::$ml->pushHandler(new StreamHandler($logger_logfile, Logger::DEBUG)); self::$ml->pushHandler(new StreamHandler($logger_logfile, Logger::DEBUG));
break; break;

View File

@@ -3458,11 +3458,7 @@ ssl_key = <<SSL_KEY_FILE>
# auth_ssl_username_from_cert=yes. # auth_ssl_username_from_cert=yes.
#ssl_cert_username_field = commonName #ssl_cert_username_field = commonName
# SSL DH parameters ssl_dh_parameters_length = 2048
# Generate new params with `openssl dhparam -out /etc/dovecot/dh.pem 4096`
# Or migrate from old ssl-parameters.dat file with the command dovecot
# gives on startup when ssl_dh is unset.
ssl_dh = </usr/share/dovecot/dh.pem
# SSL protocols to use # SSL protocols to use
#ssl_protocols = !SSLv3 #ssl_protocols = !SSLv3

View File

@@ -1494,7 +1494,10 @@ Vielen Dank, Ihr Administrator',
'title' => 'Log-Art(en)', 'title' => 'Log-Art(en)',
'description' => 'Wählen Sie hier die gewünschten Logtypen. Für Mehrfachauswahl, halten Sie während der Auswahl STRG gedrückt<br />Mögliche Logtypen sind: syslog, file, mysql', 'description' => 'Wählen Sie hier die gewünschten Logtypen. Für Mehrfachauswahl, halten Sie während der Auswahl STRG gedrückt<br />Mögliche Logtypen sind: syslog, file, mysql',
], ],
'logfile' => 'Log-Datei Pfad inklusive Dateinamen', 'logfile' => [
'title' => 'Dateiname der Logdatei',
'description' => 'Wird nur verwendet, wenn die Log-Art "file" ausgewählt ist. Diese Datei wird unter froxlor/logs/ geschrieben. Dieser Ordner ist vor Webzugriff geschützt.',
],
'logcron' => 'Logge Cronjobs', 'logcron' => 'Logge Cronjobs',
'logcronoption' => [ 'logcronoption' => [
'never' => 'Nie', 'never' => 'Nie',

View File

@@ -1613,7 +1613,10 @@ Yours sincerely, your administrator',
'title' => 'Log-type(s)', 'title' => 'Log-type(s)',
'description' => 'Specify logtypes. To select multiple types, hold down CTRL while selecting.<br />Available logtypes are: syslog, file, mysql', 'description' => 'Specify logtypes. To select multiple types, hold down CTRL while selecting.<br />Available logtypes are: syslog, file, mysql',
], ],
'logfile' => 'Logfile path including filename', 'logfile' => [
'title' => 'Filename for log',
'description' => 'Only used if log-type includes "file". This file will be created in froxlor/logs/. This folder is protected against public access.',
],
'logcron' => 'Log cronjobs', 'logcron' => 'Log cronjobs',
'logcronoption' => [ 'logcronoption' => [
'never' => 'Never', 'never' => 'Never',