PORT=1186
SERVER=mgt
===============================================================
ck_mgt()
{
l_TELNET=`echo "quit" | telnet $SERVER $PORT | grep "Escape character is"`
if [ "$?" -ne 0 ]; then
echo "Connection to $SERVER on port $PORT failed"
exit 1
else
echo "Connection to $SERVER on port $PORT succeeded"
fi
}
ck_mgt
===============================================================
沒有留言:
張貼留言