add paramter 'mail-notify' to froxlor:update CLI script to notify the system administrator via email about a new version (once per version)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -700,6 +700,8 @@ opcache.validate_timestamps'),
|
||||
('system', 'acmeshpath', '/root/.acme.sh/acme.sh'),
|
||||
('system', 'distribution', ''),
|
||||
('system', 'update_channel', 'stable'),
|
||||
('system', 'updatecheck_data', ''),
|
||||
('system', 'update_notify_last', '0.11.0-dev1'),
|
||||
('api', 'enabled', '0'),
|
||||
('2fa', 'enabled', '1'),
|
||||
('panel', 'decimal_places', '4'),
|
||||
|
||||
@@ -37,7 +37,10 @@ if (!defined('_CRON_UPDATE')) {
|
||||
|
||||
// last 0.10.x release
|
||||
if (Froxlor::isFroxlorVersion('0.10.99')) {
|
||||
Update::showUpdateStep("Updating from 0.10.99 to 0.11.0-dev1", false);
|
||||
|
||||
$update_to = '0.11.0-dev1';
|
||||
|
||||
Update::showUpdateStep("Updating from 0.10.99 to ".$update_to, false);
|
||||
|
||||
Update::showUpdateStep("Removing unused table");
|
||||
Database::query("DROP TABLE IF EXISTS `panel_sessions`;");
|
||||
@@ -134,6 +137,7 @@ if (Froxlor::isFroxlorVersion('0.10.99')) {
|
||||
Settings::AddNew("system.distribution", $system_distribution);
|
||||
Settings::AddNew("system.update_channel", 'stable');
|
||||
Settings::AddNew("system.updatecheck_data", '');
|
||||
Settings::AddNew("system.update_notify_last", $update_to);
|
||||
Update::lastStepStatus(0);
|
||||
|
||||
Update::showUpdateStep("Adjusting existing settings");
|
||||
@@ -152,5 +156,5 @@ if (Froxlor::isFroxlorVersion('0.10.99')) {
|
||||
Settings::Set('panel.standardlanguage', $lang_map[Settings::Get('panel_standardlanguage')] ?? 'en');
|
||||
Update::lastStepStatus(0);
|
||||
|
||||
Froxlor::updateToVersion('0.11.0-dev1');
|
||||
Froxlor::updateToVersion($update_to);
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
|
||||
*/
|
||||
|
||||
use Froxlor\Froxlor;
|
||||
use Froxlor\FileDir;
|
||||
use Froxlor\Install\Update;
|
||||
|
||||
$preconfig = [
|
||||
|
||||
Reference in New Issue
Block a user