security/acme-client: fix two small issues for #6

This commit is contained in:
Franco Fichtner
2017-01-27 09:19:57 +01:00
parent 61bed3d8d3
commit aeec3bd526
5 changed files with 11 additions and 9 deletions
@@ -57,15 +57,14 @@ function acmeclient_firewall($fw)
*/
function acmeclient_services()
{
if (!acmeclient_enabled()) {
return;
}
global $config;
$services = array();
if (!acmeclient_enabled()) {
return $services;
}
$services[] = array(
'description' => gettext('Secure Lets Encrypt client'),
'description' => gettext('Let\'s Encrypt client'),
'configd' => array(
'restart' => array('acme-http-challenge restart'),
'start' => array('acme-http-challenge start'),
@@ -89,7 +88,7 @@ function acmeclient_xmlrpc_sync()
$result = array();
$result['id'] = 'acmeclient';
$result['section'] = 'OPNsense.acmeclient';
$result['description'] = gettext('Lets Encrypt Client');
$result['description'] = gettext('Let\'s Encrypt client');
return array($result);
}
*/
@@ -820,7 +820,7 @@ function import_certificate($certObj, $modelObj)
// Write changes to config
// TODO: Legacy code, should be replaced with code from OPNsense framework
write_config("${import_log_message} Lets Encrypt SSL certificate: ${cert_cn}");
write_config("${import_log_message} Let's Encrypt SSL certificate: ${cert_cn}");
// Update (acme) certificate object (through MVC framework)
$uuid = $certObj->attributes()->uuid;
@@ -1,3 +1,2 @@
lighttpd-acme-challenge.conf:/var/etc/lighttpd-acme-challenge.conf
rc.conf.d:/etc/rc.conf.d/acme_http_challenge
lighttpd-rc-script:/usr/local/etc/rc.d/acme_http_challenge
@@ -2,6 +2,8 @@
# Automatically generated configuration.
# Do not edit this file manually.
{% if helpers.exists('OPNsense.AcmeClient.settings') %}
# FreeBSD!
server.event-handler = "freebsd-kqueue"
server.network-backend = "writev"
@@ -84,3 +86,5 @@ compress.filetype = ("text/plain","text/css", "text/xml", "text/javascript" )
server.max-request-size = 4096
expire.url = ( "" => "access 10 hours" )
{% endif %}