You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
227 B

next_port () {
local port_start=$1
local port_end=$2
ports=$(wg show all listen-port | awk '{print $2}')
for i in $(seq $port_start $port_end); do
if ! echo $ports | grep -q "$i"; then
echo $i
return
fi
done
}