summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2020-05-25 15:31:26 +0800
committerliuxueli <[email protected]>2020-05-25 15:31:26 +0800
commit43ac760c127ef035a0eeccb3508595b18b71459f (patch)
tree7cf0029ad122434e492c5936ba42dd849864f68a /cmake
parent9114bc442d8e48ece8da816460513b5cee9b5604 (diff)
安装时在sapp上注册DNS协议,etc/entrylist.conf
安装时不覆盖旧配置文件
Diffstat (limited to 'cmake')
-rw-r--r--cmake/.gitignore5
-rw-r--r--cmake/preInstall.sh11
-rw-r--r--cmake/preUninstall.sh6
3 files changed, 22 insertions, 0 deletions
diff --git a/cmake/.gitignore b/cmake/.gitignore
new file mode 100644
index 0000000..b9ffdf6
--- /dev/null
+++ b/cmake/.gitignore
@@ -0,0 +1,5 @@
+build
+__view
+*.o
+*.so
+*.a
diff --git a/cmake/preInstall.sh b/cmake/preInstall.sh
new file mode 100644
index 0000000..ecbbac3
--- /dev/null
+++ b/cmake/preInstall.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+DST=${RPM_INSTALL_PREFIX}
+mkdir -p ${DST}/plug/protocol/
+touch ${DST}/plug/conflist.inf
+touch ${DST}/etc/entrylist.conf
+if [[ -z `grep -rn 'dns.inf' ${DST}/plug/conflist.inf` ]];then
+ sed -i '/\[protocol\]/a\./plug/protocol/dns/dns.inf' ${DST}/plug/conflist.inf
+fi
+if [[ -z `grep -rn 'DNS' ${DST}etc/entrylist.conf` ]];then
+ echo "DNS" >> ${DST}etc/entrylist.conf
+fi
diff --git a/cmake/preUninstall.sh b/cmake/preUninstall.sh
new file mode 100644
index 0000000..186466f
--- /dev/null
+++ b/cmake/preUninstall.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+DST=${RPM_INSTALL_PREFIX}
+mkdir -p ${DST}/plug/business/
+touch ${DST}/plug/conflist.inf
+sed -i '/dns.inf/d' ${DST}/plug/conflist.inf
+sed -i '/DNS/d' ${DST}etc/entrylist.conf