#!/bin/bash

SERVER_NAME=kafka
Line_Num=`ps -ef|grep -w  ${SERVER_NAME} |grep -Ev "grep|sh|bash"|wc -l`

if [ ${Line_Num} -eq 0 ];then
	echo "Kafka is Down，Now Restart!"
	systemctl start kafka
else
	echo "Kafka is Already Running!"
fi
