CodisProxy_Daemon.sh
#!/bin/bash
#CodisProxy Daemon Process
ProcessName=codis-proxy
SleepTime=10
CodisPath[9990]=/opt/codismem/conf_one/
CodisPath[9991]=/opt/codismem/conf_two/
CodisPath[9992]=/opt/codismem/conf_three/
CodisPath[9993]=/opt/codismem/conf_four/
CodisPath[9994]=/opt/codismem/conf_five/
while true
do
for i in 999{0..4};do
CodisProxyProc=`ps -ef |grep $ProcessName |grep $i |grep -v grep|wc -l`
if [ $CodisProxyProc = 0 ];then
cd ${CodisPath[$i]} && ./start_proxy.sh && ./set_proxy_online.sh
fi
done
sleep $SleepTime
#!/bin/bash
#CodisProxy Daemon Process
ProcessName=codis-proxy
SleepTime=10
CodisPath[9990]=/opt/codismem/conf_one/
CodisPath[9991]=/opt/codismem/conf_two/
CodisPath[9992]=/opt/codismem/conf_three/
CodisPath[9993]=/opt/codismem/conf_four/
CodisPath[9994]=/opt/codismem/conf_five/
while true
do
for i in 999{0..4};do
CodisProxyProc=`ps -ef |grep $ProcessName |grep $i |grep -v grep|wc -l`
if [ $CodisProxyProc = 0 ];then
cd ${CodisPath[$i]} && ./start_proxy.sh && ./set_proxy_online.sh
fi
done
sleep $SleepTime
done
nohup sh CodisProxy_Daemon.sh &