aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@toke.dk>2020-09-08 11:59:38 +0200
committerToke Høiland-Jørgensen <toke@toke.dk>2020-09-09 12:49:53 +0200
commite6c1676cb4220d17534269f6bb1799eed7fa9625 (patch)
tree3153599f87e919d141765bb23ed58446ed29bd08
parentda183bdb3df63c38c45da292d7b359bc4015f3b4 (diff)
acme: Make sure we don't handle the same listener twice
If a daemon listens on multiple addresses at once, it'll show up multiple times in get_listeners() which will clobber the config for uhttpd. Fix this by skipping subsequent handlings of the same daemon binary. Fixes #13325. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
-rw-r--r--net/acme/Makefile2
-rw-r--r--net/acme/files/run.sh10
2 files changed, 11 insertions, 1 deletions
diff --git a/net/acme/Makefile b/net/acme/Makefile
index 158037e9e..d62cce0c9 100644
--- a/net/acme/Makefile
+++ b/net/acme/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=acme
PKG_VERSION:=2.8.6
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/acmesh-official/acme.sh/archive/$(PKG_VERSION).tar.gz
diff --git a/net/acme/files/run.sh b/net/acme/files/run.sh
index eccd3cb18..5c9361f4f 100644
--- a/net/acme/files/run.sh
+++ b/net/acme/files/run.sh
@@ -77,6 +77,11 @@ pre_checks()
case "$cmd" in
uhttpd)
+ if [ -n "$UHTTPD_LISTEN_HTTP" ]; then
+ debug "Already handled uhttpd; skipping"
+ continue
+ fi
+
debug "Found uhttpd listening on port 80; trying to disable."
UHTTPD_LISTEN_HTTP=$(uci get uhttpd.main.listen_http)
@@ -96,6 +101,11 @@ pre_checks()
fi
;;
nginx*)
+ if [ "$NGINX_WEBSERVER" -eq "1" ]; then
+ debug "Already handled nginx; skipping"
+ continue
+ fi
+
debug "Found nginx listening on port 80; trying to disable."
NGINX_WEBSERVER=1
local tries=0