Added cronjob to database and added a hint to the README

Signed-off-by: Florian Aders <eleras@froxlor.org>
This commit is contained in:
Florian Aders
2016-01-31 12:09:54 +01:00
parent b62f4ef911
commit 7814499b87
4 changed files with 28 additions and 2 deletions

View File

@@ -58,3 +58,16 @@ http://files.froxlor.org/releases/froxlor-latest.tar.gz [MD5](http://files.froxl
[HowTo](http://redmine.froxlor.org/projects/froxlor/wiki/Installationgentoo)
http://files.froxlor.org/gentoo/repositories.xml
## Let's encrypt support
This version of Froxlor contains a beta - version of support for [Let's Encrypt](https://letsencrypt.org). This is (as Let's Encrypt is in itself)
still a test - version and may break your system. The way it currently works is by creating a (sub-)domain with the default system - certificate,
after which the Let's Encrypt cronjob orders the certificate for this (sub-)domain and inserts the certificates in the database. With the next run
of the default cronjob, the certificates will be updated on the disk and the webserver reloaded.
This has 2 known side-effects at the moment:
* The ip/port combinations don't work with the Froxlor - integration of Let's Encrypt, since it needs a certificate for the very first creation
* After creating a domain, it will have the default certificate for a short time (by default 5 minutes until the cronjob runs the next time)
It may be possible to fix these issues, but they are not a priority at the moment

View File

@@ -752,7 +752,8 @@ INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`,
(3, 'froxlor/ticket', 'used_tickets_reset', '1 DAY', '1', 'cron_ticketsreset'),
(4, 'froxlor/ticket', 'ticketarchive', '1 MONTH', '1', 'cron_ticketarchive'),
(5, 'froxlor/reports', 'usage_report', '1 DAY', '1', 'cron_usage_report'),
(6, 'froxlor/core', 'mailboxsize', '6 HOUR', '1', 'cron_mailboxsize');
(6, 'froxlor/core', 'mailboxsize', '6 HOUR', '1', 'cron_mailboxsize'),
(7, 'froxlor/letsencrypt', 'letsencrypt', '5 MINUTE', '1', 'cron_letsencrypt');

View File

@@ -3032,6 +3032,17 @@ if (isFroxlorVersion('0.9.34.2')) {
Database::query("ALTER TABLE `".TABLE_PANEL_DOMAINS."` ADD `letsencrypt` TINYINT(1) NOT NULL DEFAULT '0' AFTER `ismainbutsubto`;");
Settings::AddNew("system.leprivatekey", 'unset');
Settings::AddNew("system.lepublickey", 'unset');
showUpdateStep("Adding new cron-module for web- and traffic-reporting");
$stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_CRONRUNS . "` SET
`module` = 'froxlor/letsencrypt',
`cronfile` = 'letsencrypt',
`interval` = '5 MINUTE',
`desc_lng_key` = 'cron_letsencrypt',
`lastrun` = DATE_SUB(NOW(), INTERVAL 5 MINUTE),
`isactive` = 1"
);
Database::pexecute($stmt);
lastStepStatus(0);
updateToVersion('0.9.35-dev1');

View File

@@ -1929,4 +1929,5 @@ $lng['opcacheinfo']['false'] = '<i>false</i>';
$lng['domains']['letsencrypt']['title'] = 'Use Let\'s Encrypt';
$lng['domains']['letsencrypt']['description'] = 'Get a free certificate from <a href="https://letsencrypt.org">Let\'s Encrypt</a>. The certificate will be created and renewed automatically.<br><strong class="red">ATTENTION:</strong>This is not possible for wildcard - domains';
$lng['error']['sslredirectonlypossiblewithsslipport'] = 'Using Let\'s Encrypt is only possible when the domain has at least one ssl-enabled IP/port combination assigned.';
$lng['panel']['letsencrypt'] = 'Using Let\'s encrypt';
$lng['panel']['letsencrypt'] = 'Using Let\'s encrypt';
$lng['crondesc']['cron_letsencrypt'] = 'updating Let\'s Encrypt certificates';