2019-07-05 09:56:52 +08:00
|
|
|
#!/bin/bash
|
|
|
|
#ps term
|
|
|
|
function psterm()
|
|
|
|
{
|
|
|
|
[ ${#} -eq 0 ] && echo "usage: $FUNCNAME STRING" && return 0
|
2020-03-13 17:44:59 +08:00
|
|
|
local pid
|
2019-07-05 09:56:52 +08:00
|
|
|
pid=$(ps ax | grep "$1" | grep -v grep | awk '{ print $1 }')
|
2019-08-22 17:39:33 +08:00
|
|
|
#echo -e "terminating '$1' / process(es):\n$pid"
|
|
|
|
kill -9 $pid 2 >/dev/null
|
2019-07-05 09:56:52 +08:00
|
|
|
}
|
|
|
|
#ps grep
|
2019-08-22 17:39:33 +08:00
|
|
|
#ps aux | grep "piflow.api.Main"| grep -v 'grep'
|
2020-03-13 17:44:59 +08:00
|
|
|
psterm piflow.api.Main 2>/dev/null
|
2019-08-22 17:39:33 +08:00
|
|
|
echo "Stop OK!"
|