You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
632 B
Bash

#!/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