Merge pull request #1 from Rafi594/patch-1

Use ss instead of netstat
This commit is contained in:
Kayou 2019-10-26 21:05:26 +09:00 committed by GitHub
commit 5800c34622
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ ynh_find_port () {
ynh_handle_getopts_args "$@" ynh_handle_getopts_args "$@"
test -n "$port" || ynh_die --message="The argument of ynh_find_port must be a valid port." test -n "$port" || ynh_die --message="The argument of ynh_find_port must be a valid port."
while netstat -nltu | grep -q -w :$port # Check if the port is free while ss -nltu | grep -q -w :$port # Check if the port is free
do do
port=$((port+1)) # Else, pass to next port port=$((port+1)) # Else, pass to next port
done done