Preview:
#!/bin/bash
#exit

#detect if port 11111 is open, if not do action:

netstat -ln | grep ":11111 " 2>&1 > /dev/null

if [ $? -eq 1 ]; then
    echo "Port is closed. Doing action..."
fi
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter