From eeb87463b6b72c026f2e6c0e503bcfab5da564c7 Mon Sep 17 00:00:00 2001 From: Ing Date: Fri, 6 Dec 2024 15:16:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20changePorts=20=E5=87=BD?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E7=AE=80=E5=8C=96=E7=AB=AF=E5=8F=A3=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BF=9D=E5=AD=98=E5=92=8C=E6=9C=8D=E5=8A=A1=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/initrd/opt/rr/menu.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/files/initrd/opt/rr/menu.sh b/files/initrd/opt/rr/menu.sh index 219deee3..a9d72b72 100755 --- a/files/initrd/opt/rr/menu.sh +++ b/files/initrd/opt/rr/menu.sh @@ -2781,9 +2781,9 @@ function changePorts() { --infobox "$(TEXT "Setting ...")" 20 100 # save to rrorg.conf rm -f "/etc/rrorg.conf" - [ ! "${HTTP:-7080}" = "7080" ] && (echo "HTTP_PORT=${HTTP}" >>"/etc/rrorg.conf" && /etc/init.d/S90thttpd restart >/dev/null 2>&1) - [ ! "${DUFS:-7304}" = "7304" ] && (echo "DUFS_PORT=${DUFS}" >>"/etc/rrorg.conf" && /etc/init.d/S99dufs restart >/dev/null 2>&1) - [ ! "${TTYD:-7681}" = "7681" ] && (echo "TTYD_PORT=${TTYD}" >>"/etc/rrorg.conf" && /etc/init.d/S99ttyd restart >/dev/null 2>&1) + [ ! "${HTTP:-7080}" = "7080" ] && echo "HTTP_PORT=${HTTP}" >>"/etc/rrorg.conf" + [ ! "${DUFS:-7304}" = "7304" ] && echo "DUFS_PORT=${DUFS}" >>"/etc/rrorg.conf" + [ ! "${TTYD:-7681}" = "7681" ] && echo "TTYD_PORT=${TTYD}" >>"/etc/rrorg.conf" # save to rru local RDXZ_PATH="${TMP_PATH}/rdxz_tmp" rm -rf "${RDXZ_PATH}" @@ -2826,6 +2826,11 @@ function changePorts() { rm -f "${RR_RAMUSER_FILE}" fi rm -rf "${RDXZ_PATH}" + { + [ ! "${HTTP:-7080}" = "7080" ] && /etc/init.d/S90thttpd restart + [ ! "${DUFS:-7304}" = "7304" ] && /etc/init.d/S99dufs restart + [ ! "${TTYD:-7681}" = "7681" ] && /etc/init.d/S99ttyd restart + } >/dev/null 2>&1 & [ ! -f "/etc/rrorg.conf" ] && MSG="$(TEXT "Ports for TTYD/DUFS/HTTP restored.")" || MSG="$(TEXT "Ports for TTYD/DUFS/HTTP changed.")" DIALOG --title "$(TEXT "Settings")" \ --msgbox "${MSG}" 0 0