start.sh
#!/bin/bash
nohup java -jar /usr/soft/app/collect/collect/target/collect-5.8.jar >/dev/null 2>&1 &
pid=`ps -ef|grep collect-5.8.jar | grep -v "grep" |awk '{print $2}'`
echo " starting " $pid
stop.sh
#!/bin/bash
pids=`ps -ef|grep collect-5.8.jar | grep -v "grep" |awk '{print $2}'`
echo $pids
for pid in $pids
do
kill -9 $pid
echo "killed " $pid
done