Skip to content

Commit

Permalink
修复 changePorts 后 menu.sh 被锁无法再次进入的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Nov 15, 2024
1 parent 229c327 commit 01aaca5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions files/initrd/opt/rr/menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ alias DIALOG='dialog --backtitle "$(backtitle)" --colors --aspect 50'
# lock
exec 304>"${WORK_PATH}/menu.lock"
flock -n 304 || {
DIALOG --title "$(TEXT "Error")" \
dialog --colors --aspect 50 --title "$(TEXT "Error")" \
--msgbox "$(TEXT "The menu.sh instance is already running in another terminal. To avoid conflicts, please operate in one instance only.")" 0 0
exit 1
}
Expand Down Expand Up @@ -2735,9 +2735,9 @@ function changePorts() {
fi
# 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" && /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)
# save to rru
RDXZ_PATH="${TMP_PATH}/rdxz_tmp"
rm -rf "${RDXZ_PATH}"
Expand Down

0 comments on commit 01aaca5

Please sign in to comment.