How to check any server port using shell script until its start

How to check any server port using shell script until its start
or,
Check to Wait for a new port establish connection using shell script


echo "Waiting for server port Up in a minute..."

while ! nc -z localhost 5000; do
  sleep 0.1 # wait for 1/10 of the second before check again
done
Share on Google Plus

About Md. Shahzad Alam

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment