diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index b7b1cbdee..79a3f1f4c 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -396,6 +396,12 @@ mw_connect_mysql(){ mw_redis(){ CONF="${ROOT_PATH}/redis/redis.conf" + + if [ ! -f "$CONF" ]; then + echo -e "not install redis!" + exit 1 + fi + REDISPORT=$(cat $CONF |grep port|grep -v '#'|awk '{print $2}') REDISPASS=$(cat $CONF |grep requirepass|grep -v '#'|awk '{print $2}') if [ "$REDISPASS" != "" ];then