piflow/piflow-bin/stop.sh

15 lines
399 B
Bash
Raw Normal View History

#!/bin/bash
#ps term
function psterm()
{
[ ${#} -eq 0 ] && echo "usage: $FUNCNAME STRING" && return 0
2020-03-13 17:44:59 +08:00
local pid
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
}
#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!"