#!/bin/bash
PORT=3306
sum=0
. /etc/init.d/functions
echo -n "Starting..."
while [ $sum -le 60 ]
do
netstat -tunap | grep -w $PORT
[ $? -eq 0 ] && action "Start OK !!!" /bin/true && break
sleep 1
echo -n "."
[ $sum -eq 60 ] && echo "" && action "Start failed !!!" /bin/false
let sum++
done
转载请注明原文地址:https://ipadbbs.8miu.com/read-56933.html