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.
28 lines
707 B
Bash
28 lines
707 B
Bash
6 months ago
|
#!/bin/sh
|
||
|
#if [ $# -ne 1 ]; then
|
||
|
# echo "-----------------------------------"
|
||
|
# echo " Undefined parameter"
|
||
|
# echo "./stopFo.sh [application name]"
|
||
|
# echo "-----------------------------------"
|
||
|
# exit 1
|
||
|
#fi
|
||
|
|
||
|
PIDS=`ps -ef | grep java | grep adds-fo | awk '{print $2}'`
|
||
|
for PID in $PIDS; do
|
||
|
echo "Process ID: $PID"
|
||
|
done
|
||
|
|
||
|
if [ -z "$PIDS" ]; then
|
||
|
echo "=============================="
|
||
|
echo " No adds-fo deamon is running"
|
||
|
echo "=============================="
|
||
|
else
|
||
|
for PID in $PIDS; do
|
||
|
echo "==============================="
|
||
|
echo "Kill adds-fo[$PID] process"
|
||
|
sudo kill -9 $PID
|
||
|
echo "adds-fo[$PID] application stop"
|
||
|
echo "==============================="
|
||
|
done
|
||
|
fi
|