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,
|
-1,
|
||||||
19,
|
19,
|
||||||
54,
|
54,
|
||||||
748,
|
751,
|
||||||
68,
|
68,
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
637,
|
640,
|
||||||
738
|
616
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
11
setup.sh
11
setup.sh
@ -614,12 +614,15 @@ if [ "${phpType}" = "tcp" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# check port range validity
|
## check port range validity
|
||||||
if [ "${inputPHPPort}" -ge 0 ] && [ "${inputPHPPort}" -le 65535 ]; then
|
# 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}"
|
phpPort="${inputPHPPort}"
|
||||||
break
|
break
|
||||||
else
|
|
||||||
echo -e "\n${err}Port must be between 0-65535${norm}"
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user