From 36f193e7e95c3cc1a34f298b383124bb401106bf Mon Sep 17 00:00:00 2001 From: APTX4869 Date: Sat, 28 Mar 2026 23:48:36 +0800 Subject: [PATCH] Update PORT extraction logic in svc-apache run script --- root/etc/s6-overlay/s6-rc.d/svc-apache/run | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/root/etc/s6-overlay/s6-rc.d/svc-apache/run b/root/etc/s6-overlay/s6-rc.d/svc-apache/run index 105c452..41cc18b 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-apache/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-apache/run @@ -2,7 +2,10 @@ # shellcheck shell=bash if [[ -f "/config/httpd.conf" ]]; then - PORT=$(grep -e "^Listen" /config/httpd.conf | awk -F ' ' '{print $2}') + PORT=$(grep -e "^Listen" /config/httpd.conf \ + | awk '{print $2}' \ + | awk -F: '{print $NF}' \ + | head -n1) fi exec \