代码拉取完成,页面将自动刷新
同步操作将从 Arjun/ollnmp 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
Color_Text()
{
echo -e " \e[0;$2m$1\e[0m"
}
Echo_Red()
{
echo $(Color_Text "$1" "31")
}
Echo_Green()
{
echo $(Color_Text "$1" "32")
}
Echo_Yellow()
{
echo $(Color_Text "$1" "33")
}
Echo_Blue()
{
echo $(Color_Text "$1" "34")
}
writeLog(){
mType=\>
mEmpty=" "
SERVICE_FILE=${source_dir}/log/install.log
echo `date`${mEmpty}${mType}${mEmpty}$1 >> ${SERVICE_FILE}
}
checkRedis(){
myredis=`ps -ef|grep redis|grep -v grep|grep -v 'su'|grep -v tail |grep -v vi|grep -v admin.sh|awk '{print $2}'`
if [ "${myredis}" != "" ];then
echo -e "\033[32m Redis is running \033[0m"
else
echo -e "\033[31m Redis is false \033[0m"
fi
}
checkPhp(){
myphp=`ps -ef|grep php-fpm|grep -v grep|grep -v 'su'|grep -v tail |grep -v vi|grep -v admin.sh|awk '{print $2}'`
if [ "${myphp}" != "" ];then
echo -e "\033[32m php is running \033[0m"
else
echo -e "\033[31m php is false \033[0m"
fi
}
checkMysql(){
mysqld=`ps -ef|grep mysqld|grep -v grep|grep -v 'su'|grep -v tail |grep -v vi|grep -v admin.sh|awk '{print $2}'`
if [ "${mysqld}" != "" ];then
echo -e "\033[32m mysql is running \033[0m"
else
echo -e "\033[31m mysql is false \033[0m"
fi
}
checkNginx(){
mynginx=`ps -ef|grep /usr/local/nginx/sbin/nginx|grep -v grep|grep -v 'su'|grep -v tail |grep -v vi|grep -v admin.sh|awk '{print $2}'`
if [ "${mynginx}" != "" ];then
echo -e "\033[32m nginx is running \033[0m"
else
echo -e "\033[31m nginx is false \033[0m"
fi
}
checkService(){
checkRedis
checkPhp
checkMysql
checkNginx
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。