mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix ynh_find_port grep
Co-Authored-By: Kayou <pierre.moltess@gmail.com>
This commit is contained in:
parent
97e83337d4
commit
be303f3e44
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ ynh_find_port () {
|
|||
ynh_handle_getopts_args "$@"
|
||||
|
||||
test -n "$port" || ynh_die --message="The argument of ynh_find_port must be a valid port."
|
||||
while ss -nltu | grep -q -w "*:$port" # Check if the port is free
|
||||
while ss -nltu | awk '{print$5}' | grep -q -E ":$port$" # Check if the port is free
|
||||
do
|
||||
port=$((port+1)) # Else, pass to next port
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue