mirror of
https://github.com/Froxlor/Froxlor.git
synced 2024-09-21 18:37:30 +00:00
make it a setting to switch between ACME v1 and v2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
parent
9aaadb1f8b
commit
d40d1f30b6
@ -100,6 +100,19 @@ return array(
|
||||
'cronmodule' => 'froxlor/letsencrypt',
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_leapiversion' => array(
|
||||
'label' => $lng['serversettings']['leapiversion'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'leapiversion',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(
|
||||
'1' => 'ACME v1',
|
||||
'2' => 'ACME v2'
|
||||
),
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_letsencryptacmeconf' => array(
|
||||
'label' => $lng['serversettings']['letsencryptacmeconf'],
|
||||
'settinggroup' => 'system',
|
||||
@ -117,8 +130,8 @@ return array(
|
||||
'default' => 'testing',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(
|
||||
'testing' => 'https://acme-staging.api.letsencrypt.org (Test)',
|
||||
'production' => 'https://acme-v01.api.letsencrypt.org (Live)'
|
||||
'testing' => 'https://acme-staging'.(Settings::Get('system.leapiversion') == '2' ? '-v02' : '').'.api.letsencrypt.org (Test)',
|
||||
'production' => 'https://acme-v0'.Settings::Get('system.leapiversion').'.api.letsencrypt.org (Live)'
|
||||
),
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
|
@ -534,6 +534,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('system', 'letsencryptkeysize', '4096'),
|
||||
('system', 'letsencryptreuseold', 0),
|
||||
('system', 'leenabled', '0'),
|
||||
('system', 'leapiversion', '1'),
|
||||
('system', 'backupenabled', '0'),
|
||||
('system', 'dnsenabled', '0'),
|
||||
('system', 'dns_server', 'bind'),
|
||||
@ -588,7 +589,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||
('panel', 'customer_hide_options', ''),
|
||||
('panel', 'version', '0.9.38.8'),
|
||||
('panel', 'db_version', '201801080');
|
||||
('panel', 'db_version', '201801090');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_tasks`;
|
||||
|
@ -3725,3 +3725,12 @@ if (isDatabaseVersion('201801070')) {
|
||||
|
||||
updateToDbVersion('201801080');
|
||||
}
|
||||
|
||||
if (isDatabaseVersion('201801080')) {
|
||||
|
||||
showUpdateStep("Adding new setting for Let's Encrypt ACME version");
|
||||
Settings::AddNew('system.leapiversion', '1');
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToDbVersion('201801090');
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
$version = '0.9.38.8';
|
||||
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
$dbversion = '201801080';
|
||||
$dbversion = '201801090';
|
||||
|
||||
// Distribution branding-tag (used for Debian etc.)
|
||||
$branding = '';
|
||||
|
@ -20,6 +20,12 @@ if (! defined('MASTER_CRONJOB'))
|
||||
*
|
||||
*/
|
||||
|
||||
if (Settings::Get('system.leapiversion') == '2') {
|
||||
// use ACME v2 is specified
|
||||
require_once __DIR__ . '/cron_letsencrypt_v2.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Updating Let's Encrypt certificates");
|
||||
|
||||
if (! extension_loaded('curl')) {
|
||||
|
Loading…
Reference in New Issue
Block a user