|
@@ -1,5 +1,12 @@
|
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
-app='oss-store.jar'
|
|
|
|
|
-pid=`jps | grep ${app} | awk '{print $1}'`
|
|
|
|
|
-kill -15 ${pid}
|
|
|
|
|
|
|
+app_name='oss-store.jar'
|
|
|
|
|
+pid=`ps -ef | grep ${app_name} | grep -v grep | awk '{print $2}'`
|
|
|
|
|
+if [[ -z ${pid} ]];
|
|
|
|
|
+then
|
|
|
|
|
+ echo ${app_name}" killed"
|
|
|
|
|
+else
|
|
|
|
|
+ echo "kill "${app_name}" with pid "${pid}
|
|
|
|
|
+ kill -15 ${pid}
|
|
|
|
|
+fi
|
|
|
|
|
+
|