acme: Get listener name from /proc/PID/exe instead of netstat output
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 <toke@toke.dk>
This commit is contained in:
parent
0e620f1fa1
commit
c931276955
2 changed files with 3 additions and 3 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=acme
|
PKG_NAME:=acme
|
||||||
PKG_VERSION:=2.8.7
|
PKG_VERSION:=2.8.7
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=6
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/acmesh-official/acme.sh/tar.gz/$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://codeload.github.com/acmesh-official/acme.sh/tar.gz/$(PKG_VERSION)?
|
||||||
|
|
|
@ -73,7 +73,7 @@ pre_checks()
|
||||||
|
|
||||||
for listener in $(get_listeners); do
|
for listener in $(get_listeners); do
|
||||||
pid="${listener%/*}"
|
pid="${listener%/*}"
|
||||||
cmd="${listener#*/}"
|
cmd="$(basename $(readlink /proc/$pid/exe))"
|
||||||
|
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
uhttpd)
|
uhttpd)
|
||||||
|
@ -100,7 +100,7 @@ pre_checks()
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
nginx*)
|
nginx)
|
||||||
if [ "$NGINX_WEBSERVER" -eq "1" ]; then
|
if [ "$NGINX_WEBSERVER" -eq "1" ]; then
|
||||||
debug "Already handled nginx; skipping"
|
debug "Already handled nginx; skipping"
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue