代码拉取完成,页面将自动刷新
#!/bin/sh
## fastcodis 2016-04-22
## http://www.aqzt.com
## http://www.aqzt.com/download/go.tar
## http://www.aqzt.com/download/jdk.tar
## http://www.aqzt.com/download/zk.tar
##email: ppabc@qq.com
##robert yu
##centos 7
source /etc/profile
restartproxy()
{
cd /opt/go/src/github.com/CodisLabs/codis/scripts
sh start_codis_proxy.sh
}
restartdashboard()
{
cd /opt/go/src/github.com/CodisLabs/codis/scripts
sh start_codis_dashboard.sh
}
restartcodis_fe()
{
cd /opt/go/src/github.com/CodisLabs/codis/scripts
sh start_codis_fe.sh
}
_proxy=$(ps -ef | grep "codis-proxy" | grep -v grep)
_dashboard=$(ps -ef | grep "codis-dashboard" | grep -v grep)
_codis_fe=$(ps -ef | grep "codis-fe" | grep -v grep)
if [[ "${_proxy}aa" == "aa" ]]
then
restartproxy;
else
cd /opt/go/src/github.com/CodisLabs/codis/scripts
_proxy=$(cat /opt/go/src/github.com/CodisLabs/codis/logs/proxy.log* | tail -n 1 | grep "wait to be online")
if [[ "${_proxy}aa" != "aa" ]]
then
#kill the proxy
pid=$(ps -ef | grep "codis-proxy" | grep -v grep | awk '{print $2}')
kill $pid
restartproxy;
fi
fi
if [[ "${_dashboard}aa" == "aa" ]]
then
restartdashboard;
else
echo "codis-dashboard is ok"
fi
if [[ "${_codis_fe}aa" == "aa" ]]
then
restartcodis_fe;
else
echo "codis-dashboard is ok"
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。