You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Waits for a port to be available# $1 = Socket-IP# $2 = Socket-Port# $3 = Timeout; If expired, returns with 1functionwait_for_port() {
ip=$1
port=$2
timeout=$3
waited=0
while! nc -z $ip$port;doif [[ $waited-gt$timeout ]];thenreturn 1
fiecho"Waiting for ${ip}:${port} to be available (${waited}/${timeout})"
sleep 1
waited=$((waited +1))donereturn 0
}
see my login-shell is doing
PS4='+ $BASH_SOURCE:$LINENO:' BASH_XTRACEFD=7 bash -xlic ""7>trace.log
less trace.log