#!/bin/sh #if [ $# -ne 1 ]; then # echo "-----------------------------------" # echo " Undefined parameter" # echo "./stopApi.sh [application name]" # echo "-----------------------------------" # exit 1 #fi PID=`ps -ef | grep java | grep adds-api | awk '{print $2}'` echo "Process ID: $PID" if [ -z $PID ]; then echo "==============================" echo " No adds-api deamon is running" echo "==============================" else echo "Kill adds-api[$PID] process" kill $PID echo "===============================" echo " adds-api[$PID] application stop" echo "===============================" fi