summaryrefslogtreecommitdiff
path: root/TWA-PIC/zookeeper/bin/set_zk_env.sh
diff options
context:
space:
mode:
authorwangchengcheng <[email protected]>2023-07-27 15:43:51 +0800
committerwangchengcheng <[email protected]>2023-07-27 15:43:51 +0800
commit124f687daace8b85e5c74abac04bcd0a92744a8d (patch)
tree4f563326b1be67cfb51bf6a04f1ca4d953536e76 /TWA-PIC/zookeeper/bin/set_zk_env.sh
parent08686ae87f9efe7a590f48db74ed133b481c85b1 (diff)
P19 23.07 online-configP19
Diffstat (limited to 'TWA-PIC/zookeeper/bin/set_zk_env.sh')
-rw-r--r--TWA-PIC/zookeeper/bin/set_zk_env.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/TWA-PIC/zookeeper/bin/set_zk_env.sh b/TWA-PIC/zookeeper/bin/set_zk_env.sh
new file mode 100644
index 0000000..57774d9
--- /dev/null
+++ b/TWA-PIC/zookeeper/bin/set_zk_env.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+echo -e "\n#zookeeper\nexport ZOOKEEPER_HOME=/home/tsg/olap/zookeeper-3.4.10\nexport PATH=\$ZOOKEEPER_HOME/bin:\$PATH" >> /etc/profile.d/zookeeper.sh
+chmod +x /etc/profile.d/zookeeper.sh
+
+keeppsth='/etc/init.d/keepzkalive'
+if [ -x $keeppsth ];then
+ chkconfig --add keepzkalive
+ chkconfig keepzkalive on
+ service keepzkalive start && sleep 5
+ zk_dae=`ps -ef | grep dae-zookeeper.sh | grep -v grep | wc -l`
+ if [ $zk_dae -eq "0" ];then
+ nohup /home/tsg/olap/zookeeper-3.4.10/bin/dae-zookeeper.sh > /dev/null 2>&1 &
+ fi
+fi
+