From c93127695531a2b7c213be16b2a0d84c4a9ae612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Date: Fri, 26 Mar 2021 17:58:33 +0100 Subject: [PATCH] acme: Get listener name from /proc/PID/exe instead of netstat output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems the command name output from netstat can be truncated in weird ways, so let's get the binary name from /proc instead and use that for matching which listener we have. Fixes #15071. Signed-off-by: Toke Høiland-Jørgensen --- net/acme/Makefile | 2 +- net/acme/files/run.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/acme/Makefile b/net/acme/Makefile index 54ee236db..7940a589d 100644 --- a/net/acme/Makefile +++ b/net/acme/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=acme PKG_VERSION:=2.8.7 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/acmesh-official/acme.sh/tar.gz/$(PKG_VERSION)? diff --git a/net/acme/files/run.sh b/net/acme/files/run.sh index 87863b58d..c2c4a57eb 100644 --- a/net/acme/files/run.sh +++ b/net/acme/files/run.sh @@ -73,7 +73,7 @@ pre_checks() for listener in $(get_listeners); do pid="${listener%/*}" - cmd="${listener#*/}" + cmd="$(basename $(readlink /proc/$pid/exe))" case "$cmd" in uhttpd) @@ -100,7 +100,7 @@ pre_checks() return 1 fi ;; - nginx*) + nginx) if [ "$NGINX_WEBSERVER" -eq "1" ]; then debug "Already handled nginx; skipping" continue