Merge pull request #12616 from andersk/acme-19.07

Backport acme fixes from #11968 to 19.07
This commit is contained in:
Toke Høiland-Jørgensen 2020-06-26 11:21:12 +02:00 committed by GitHub
commit 0ea1e213e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=acme
PKG_VERSION:=2.8.5
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/Neilpang/acme.sh/tar.gz/$(PKG_VERSION)?

View file

@ -32,17 +32,17 @@ check_cron()
log()
{
logger -t acme -s -p daemon.info "$@"
logger -t acme -s -p daemon.info -- "$@"
}
err()
{
logger -t acme -s -p daemon.err "$@"
logger -t acme -s -p daemon.err -- "$@"
}
debug()
{
[ "$DEBUG" -eq "1" ] && logger -t acme -s -p daemon.debug "$@"
[ "$DEBUG" -eq "1" ] && logger -t acme -s -p daemon.debug -- "$@"
}
get_listeners() {
@ -183,6 +183,7 @@ issue_cert()
local update_uhttpd
local update_nginx
local keylength
local keylength_ecc=0
local domains
local main_domain
local moved_staging=0
@ -215,6 +216,7 @@ issue_cert()
if echo $keylength | grep -q "^ec-"; then
domain_dir="$STATE_DIR/${main_domain}_ecc"
keylength_ecc=1
else
domain_dir="$STATE_DIR/${main_domain}"
fi
@ -234,6 +236,7 @@ issue_cert()
moved_staging=1
else
log "Found previous cert config. Issuing renew."
[ "$keylength_ecc" -eq "1" ] && acme_args="$acme_args --ecc"
run_acme --home "$STATE_DIR" --renew -d "$main_domain" $acme_args && ret=0 || ret=1
post_checks
return $ret