perf: 优化cac安装脚本

main
huangfeng 1 year ago
parent eeae0097ba
commit 16f3e65b02

@ -10,3 +10,5 @@ DB_PASS=123456
REDIS_PASS=123456 REDIS_PASS=123456
### 是否安装自带的Redis ### ### 是否安装自带的Redis ###
REDIS_INS=1 REDIS_INS=1
### 是否加入开机启动 ###
AUTO_START=1

@ -149,8 +149,12 @@ installDLHL(){
#################### 加入开机启动 ################################################ #################### 加入开机启动 ################################################
setAutoStartCac(){ setAutoStartCac(){
if [ `grep -c ${BIN_DIR}/startCac.sh /etc/rc.d/rc.local` -eq '0' ]; then if [ `grep -c ${BIN_DIR}/startCac.sh /etc/rc.d/rc.local` -eq '0' ]; then
echo '#CAC' >> /etc/rc.d/rc.local echo '#New CAC' >> /etc/rc.d/rc.local
if [ $REDIS_INS == 1 ]; then
echo ${BIN_DIR}/startRedis.sh >> /etc/rc.d/rc.local
fi
echo ${BIN_DIR}/startCac.sh >> /etc/rc.d/rc.local echo ${BIN_DIR}/startCac.sh >> /etc/rc.d/rc.local
echo ${BIN_DIR}/startDlhl.sh >> /etc/rc.d/rc.local
fi fi
echo "CAC已加入开机启动." echo "CAC已加入开机启动."
echo "" echo ""
@ -183,5 +187,9 @@ installNewCAC
installDLHL installDLHL
if [ $AUTO_START == 1 ]; then
setAutoStartCac
fi
echo "************[install finished.]安装完成. >>>>>>>>>>>>>" echo "************[install finished.]安装完成. >>>>>>>>>>>>>"
sleep 1 sleep 1

Loading…
Cancel
Save