parent
f2f0d3d3ac
commit
9fdc122a71
1 changed files with 4 additions and 0 deletions
|
@ -240,6 +240,10 @@ if [[ ! -e /etc/wireguard/wg0.conf ]]; then
|
||||||
echo "$port: invalid port."
|
echo "$port: invalid port."
|
||||||
read -p "Port [51820]: " port
|
read -p "Port [51820]: " port
|
||||||
done
|
done
|
||||||
|
until [[ -z "$port" || -z $(lsof -i :"$port") ]]; do
|
||||||
|
echo "Port $port is already in use. Please select another."
|
||||||
|
read -p "Port [51820]: " port
|
||||||
|
done
|
||||||
[[ -z "$port" ]] && port="51820"
|
[[ -z "$port" ]] && port="51820"
|
||||||
echo
|
echo
|
||||||
echo "Enter a name for the first client:"
|
echo "Enter a name for the first client:"
|
||||||
|
|
Loading…
Add table
Reference in a new issue