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.

21 lines
398 B
Bash

#!/bin/bash
rm -f /home/xydl/61850_GUI/RUNNING.lock
app='61850Gui_Release_zhenan'
pid=`ps -ef | grep $app | grep -v 'grep' | awk '{print $2}'`
rid=`ps -ef | grep sreadd | grep -v "grep" | awk '{print $2}'`
if [ -n "rid" ]; then
for id in $rid
do
kill -9 $id
sleep 1
done
fi
if [ -n "$pid" ]; then
echo "Stopping 61850..."
for id in $pid
do
kill -9 $id
sleep 2
done
fi