summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2019-12-25 11:17:29 +0800
committerliuxueli <[email protected]>2019-12-25 11:17:29 +0800
commit261d36fc871333cdaffb715d336f7500973f2f87 (patch)
tree99d85fa1a708fd4c5ba3fb92957eb84002f73ce0
parentbb28ec07931a0f1262999299c6e8996069057ba4 (diff)
调整参数默认值
调整预安装脚本
-rw-r--r--preinstall/install.sh9
-rw-r--r--src/ntc_radius_plug.cpp2
2 files changed, 8 insertions, 3 deletions
diff --git a/preinstall/install.sh b/preinstall/install.sh
index 729c6f8..d1deb82 100644
--- a/preinstall/install.sh
+++ b/preinstall/install.sh
@@ -6,16 +6,21 @@ touch ${DST}/plug/conflist.inf
mkdir -p ${DST}/conf/
touch ${DST}/${CONFILE}
+if [[ -z `grep -rn '[business]' ${DST}/plug/conflist.inf` ]];then
+ echo '[business]' >> ${DST}/plug/conflist.inf
+fi
+
if [[ -z `grep -rn 'ntc_radius_plug.inf' ${DST}/plug/conflist.inf` ]];then
sed -i '/\[business\]/a\./plug/business/ntc_radius_plug/ntc_radius_plug.inf' ${DST}/plug/conflist.inf
fi
-if [[ -z `grep -rn '\[RADIUS_PLUG\]' ${DST}/tsgconf/main.conf` ]];then
+if [[ -z `grep -rn '\[RADIUS_PLUG\]' ${DST}/${CONFILE}` ]];then
sed -i '1i\\[RADIUS_PLUG\]' ${DST}/${CONFILE}
sed -i '/\[RADIUS_PLUG\]/a\LOG_LEVEL=30' ${DST}/${CONFILE}
sed -i '/\[RADIUS_PLUG\]/a\LOG_PATH=./log/ntc_radius_plug/ntc_radius_plug' ${DST}/${CONFILE}
sed -i '/\[RADIUS_PLUG\]/a\NIC_NAME=lo' ${DST}/${CONFILE}
sed -i '/\[RADIUS_PLUG\]/a\SERVICE_ID=162' ${DST}/${CONFILE}
sed -i '/\[RADIUS_PLUG\]/a\COLLECT_TOPIC=RADIUS-RECORD-LOG' ${DST}/${CONFILE}
- sed -i '/\[RADIUS_PLUG\]/a\BROKERLIST=192.168.40.186:9092' ${DST}/${CONFILE}
+ sed -i '/\[RADIUS_PLUG\]/a\BROKERLIST=127.0.0.1:9092' ${DST}/${CONFILE}
+ sed -i '/\[RADIUS_PLUG\]/a\DEVICE_ID=0' ${DST}/${CONFILE}
fi
diff --git a/src/ntc_radius_plug.cpp b/src/ntc_radius_plug.cpp
index 3dc5e78..f0ac373 100644
--- a/src/ntc_radius_plug.cpp
+++ b/src/ntc_radius_plug.cpp
@@ -336,7 +336,7 @@ int NTC_RADIUS_PLUG_INIT(void)
rd_kafka_topic_conf_t *topic_conf;
memset(&g_ntc_radius_plug,0,sizeof(g_ntc_radius_plug_t));
- MESA_load_profile_string_def(config_file, "RADIUS_PLUG", "NIC_NAME", nic_name, sizeof(nic_name), "eth0");
+ MESA_load_profile_string_def(config_file, "RADIUS_PLUG", "NIC_NAME", nic_name, sizeof(nic_name), "lo");
MESA_load_profile_string_def(config_file, "RADIUS_PLUG","LOG_PATH",g_ntc_radius_plug.pathname, sizeof(g_ntc_radius_plug.pathname), "./log/ntc_radius_plug/ntc_radius_plug");
MESA_load_profile_int_def(config_file, "RADIUS_PLUG", "SERVICE_ID", &g_ntc_radius_plug.service_id, 0xA2);
MESA_load_profile_int_def(config_file, "RADIUS_PLUG","LOG_LEVEL", &g_ntc_radius_plug.level, RLOG_LV_FATAL);