From d6e182b94f905c4828f6c09c3a1c20e60f38de9e Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Tue, 6 Aug 2024 13:01:05 +0800 Subject: [PATCH] Update mw.tpl --- scripts/init.d/mw.tpl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index 6dc67551c..00a59247c 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -429,6 +429,19 @@ mw_connect_mysql(){ } +mw_mongodb(){ + CONF="${ROOT_PATH}/mongodb/mongodb.conf" + if [ ! -f "$CONF" ]; then + echo -e "not install mongodb!" + exit 1 + fi + + MGDB_PORT=$(cat $CONF |grep port|grep -v '#'|awk '{print $2}') + + echo ${MGDB_PORT} +} + + mw_redis(){ CONF="${ROOT_PATH}/redis/redis.conf"