prepare ssl-per-domain (customer setable), no cronjob-functionality yet (intended), refs #365
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -512,6 +512,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('system', 'documentroot_use_default_value', '0'),
|
||||
('system', 'passwordcryptfunc', '1'),
|
||||
('system', 'axfrservers', ''),
|
||||
('system', 'customer_ssl_path', '/etc/apache2/ssl/'),
|
||||
('panel', 'decimal_places', '4'),
|
||||
('panel', 'adminmail', 'admin@SERVERNAME'),
|
||||
('panel', 'phpmyadmin_url', ''),
|
||||
@@ -539,7 +540,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('panel', 'phpconfigs_hidestdsubdomain', '0'),
|
||||
('panel', 'allow_theme_change_admin', '1'),
|
||||
('panel', 'allow_theme_change_customer', '1'),
|
||||
('panel', 'version', '0.9.29-dev3');
|
||||
('panel', 'version', '0.9.29-dev4');
|
||||
|
||||
|
||||
|
||||
@@ -917,3 +918,13 @@ CREATE TABLE IF NOT EXISTS `domain_docrootsettings` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `domain_ssl_settings`;
|
||||
CREATE TABLE IF NOT EXISTS `domain_ssl_settings` (
|
||||
`id` int(5) NOT NULL auto_increment,
|
||||
`domainid` int(11) NOT NULL,
|
||||
`ssl_cert_file` text NOT NULL,
|
||||
`ssl_key_file` text NOT NULL,
|
||||
`ssl_ca_file` text NOT NULL,
|
||||
`ssl_cert_chainfile` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
@@ -2109,3 +2109,24 @@ if (isFroxlorVersion('0.9.29-dev2')) {
|
||||
|
||||
updateToVersion('0.9.29-dev3');
|
||||
}
|
||||
|
||||
if (isFroxlorVersion('0.9.29-dev3')) {
|
||||
showUpdateStep("Updating from 0.9.29-dev3 to 0.9.29-dev4", true);
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Adding new tables to database");
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `domain_ssl_settings` (
|
||||
`id` int(5) NOT NULL auto_increment,
|
||||
`domainid` int(11) NOT NULL,
|
||||
`ssl_cert_file` text NOT NULL,
|
||||
`ssl_key_file` text NOT NULL,
|
||||
`ssl_ca_file` text NOT NULL,
|
||||
`ssl_cert_chainfile` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;");
|
||||
lastStepStatus(0);
|
||||
|
||||
$system_customersslpath = isset($_POST['system_customersslpath']) ? makeCorrectDir($_POST['system_customersslpath']) : '/etc/apache2/ssl/';
|
||||
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'customer_ssl_path', '".$db->escape($system_customersslpath)."');");
|
||||
updateToVersion('0.9.29-dev4');
|
||||
}
|
||||
|
||||
@@ -52,4 +52,3 @@ function versionInUpdate($current_version, $version_to_check)
|
||||
|
||||
return (version_compare2($current_version, $version_to_check) == -1 ? true : false);
|
||||
}
|
||||
|
||||
|
||||
@@ -533,4 +533,12 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
$question.= '<input type="text" class="text" name="system_afxrservers" value="" />';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if (versionInUpdate($current_version, '0.9.29-dev4')) {
|
||||
$has_preconfig = true;
|
||||
$description = 'As customers can now specify ssl-certificate data for their domains, you need to specify where the generated files are stored<br />';
|
||||
$question = '<strong>Specify the directory for customer ssl-certificates:</strong> ';
|
||||
$question.= '<input type="text" class="text" name="system_customersslpath" value="/etc/apache2/ssl/" />';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user