diff options
Diffstat (limited to 'TWA-PIC/kafka/bin/set_kafka_env.sh')
| -rw-r--r-- | TWA-PIC/kafka/bin/set_kafka_env.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/TWA-PIC/kafka/bin/set_kafka_env.sh b/TWA-PIC/kafka/bin/set_kafka_env.sh new file mode 100644 index 0000000..e83c44e --- /dev/null +++ b/TWA-PIC/kafka/bin/set_kafka_env.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +echo -e "\n#kafka\nexport KAFKA_HOME=/home/tsg/olap/kafka_2.11-1.0.0\nexport PATH=\$KAFKA_HOME/bin:\$PATH" >> /etc/profile.d/kafka.sh +chmod +x /etc/profile.d/kafka.sh +source /etc/profile + +keeppath='/etc/init.d/keepkafalive' +if [ -x $keeppath ];then + chkconfig --add keepkafalive + chkconfig keepkafalive on + service keepkafalive start && sleep 5 + kafka_dae=`ps -ef | grep dae-kafka.sh | grep -v grep | wc -l` + if [ $kafka_dae -eq "0" ];then + nohup /home/tsg/olap/kafka_2.11-1.0.0/bin/dae-kafka.sh > /dev/null 2>&1 & + fi +fi + |
