Update menu.sh

dependabot/github_actions/actions/checkout-3.1.0
fscarmen 3 years ago committed by GitHub
parent 7d52871d8b
commit 609cee96f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      menu.sh

@ -1070,6 +1070,7 @@ input_port() {
i=5
PORT=40000
ss -nltp | grep -q ":$PORT"[[:space:]] && reading " $(text_eval 103) " PORT || reading " $(text 104) " PORT
PORT=${PORT:-'40000'}
until grep -qE "^[1-9][0-9]{3,4}$" <<< $PORT && [[ "$PORT" -ge 1000 && "$PORT" -le 65535 ]] && [[ ! $(ss -nltp) =~ :"$PORT"[[:space:]] ]]; do
(( i-- )) || true
[[ $i = 0 ]] && error " $(text 29) "
@ -1078,9 +1079,11 @@ input_port() {
[[ $(ss -nltp) =~ :"$PORT"[[:space:]] ]] && reading " $(text_eval 103) " PORT
else
reading " $(text_eval 111) " PORT
PORT=${PORT:-'40000'}
fi
else
reading " $(text_eval 111) " PORT
PORT=${PORT:-'40000'}
fi
done
}

Loading…
Cancel
Save