phpPort check for letters
This commit is contained in:
parent
95eaf051f4
commit
60e1a34c8f
6
.vscode/numbered-bookmarks.json
vendored
6
.vscode/numbered-bookmarks.json
vendored
@ -6,13 +6,13 @@
|
||||
-1,
|
||||
19,
|
||||
54,
|
||||
748,
|
||||
751,
|
||||
68,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
637,
|
||||
738
|
||||
640,
|
||||
616
|
||||
]
|
||||
}
|
||||
]
|
||||
|
11
setup.sh
11
setup.sh
@ -614,12 +614,15 @@ if [ "${phpType}" = "tcp" ]; then
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
# check port range validity
|
||||
if [ "${inputPHPPort}" -ge 0 ] && [ "${inputPHPPort}" -le 65535 ]; then
|
||||
## check port range validity
|
||||
# check for letters
|
||||
if [[ "${inputPHPPort}" =~ .*[a-zA-Z].* ]]; then
|
||||
echo -e "\n${err}Port value must be numeric with no letters${norm}"
|
||||
elif [ ! "${inputPHPPort}" -ge 0 ] || [ ! "${inputPHPPort}" -le 65535 ]; then
|
||||
echo -e "\n${err}Port must be between 0-65535${norm}"
|
||||
else
|
||||
phpPort="${inputPHPPort}"
|
||||
break
|
||||
else
|
||||
echo -e "\n${err}Port must be between 0-65535${norm}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user