#!bin/bash
if [[ $port -eq 1 || $porcess -eq 2 ]];then #通过条件判断端口和进程执行的返回值.
echo "mysql is starting"
else
echo "mysql is stop"
/etc/init.d/mysqld start #如果服务是停止的,则启动服务.
fi
转载于:https://www.cnblogs.com/liusingbon/p/11299319.html
#!bin/bash
if [[ $port -eq 1 || $porcess -eq 2 ]];then #通过条件判断端口和进程执行的返回值.
echo "mysql is starting"
else
echo "mysql is stop"
/etc/init.d/mysqld start #如果服务是停止的,则启动服务.
fi
转载于:https://www.cnblogs.com/liusingbon/p/11299319.html