#!/bin/sh PID=`ps -ef | grep java | grep ens-api- | awk '{print $2}'` echo "Process ID: $PID" if [ -z $PID ]; then echo "No process is running" else echo "Kill process" kill $PID echo "=========================" echo "mens-api deamon stop" echo "=========================" fi