mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-04 22:33:07 -04:00
security/acme-client: finishing touches for #6
This commit is contained in:
parent
aeec3bd526
commit
0f03a5a063
3 changed files with 5 additions and 11 deletions
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
/**
|
||||
* Copyright (C) 2017 Frank Wall
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
@ -25,18 +24,14 @@
|
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
function acmeclient_enabled()
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (isset($config['OPNsense']['AcmeClient']['general']['enabled']) && $config['OPNsense']['AcmeClient']['general']['enabled'] == 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return isset($config['OPNsense']['AcmeClient']['settings']['enabled']) &&
|
||||
$config['OPNsense']['AcmeClient']['settings']['enabled'] == 1;
|
||||
}
|
||||
|
||||
function acmeclient_firewall($fw)
|
||||
|
|
@ -65,12 +60,13 @@ function acmeclient_services()
|
|||
|
||||
$services[] = array(
|
||||
'description' => gettext('Let\'s Encrypt client'),
|
||||
'pidfile' => '/var/run/lighttpd-acme-challenge.pid',
|
||||
'configd' => array(
|
||||
'restart' => array('acme-http-challenge restart'),
|
||||
'start' => array('acme-http-challenge start'),
|
||||
'stop' => array('acme-http-challenge stop'),
|
||||
),
|
||||
'name' => 'acmeclient',
|
||||
'name' => 'acme',
|
||||
);
|
||||
|
||||
return $services;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,4 @@ for directory in ${ACME_DIRS}; do
|
|||
chmod -R 755 ${directory}
|
||||
done
|
||||
|
||||
# XXX: fix file permissions of rc script (limitation of +TARGETS mechanism)
|
||||
chmod 755 /usr/local/etc/rc.d/acme_http_challenge
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
acme_http_challenge_enable=YES
|
||||
acme_http_challenge_conf="/var/etc/lighttpd-acme-challenge.conf"
|
||||
acme_http_challenge_pidfile="/var/run/lighttpd-acme-challenge.pid"
|
||||
acme_http_challenge_opnsense_bootup_run="/usr/local/opnsense/scripts/OPNsense/AcmeClient/setup.sh"
|
||||
{% else %}
|
||||
acme_http_challenge_enable=NO
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue