Fix status check

This commit is contained in:
Teddysun 2015-08-27 10:46:50 +08:00
parent 914b2368a0
commit 7cd4be9140

View File

@ -28,7 +28,7 @@ start(){
}
stop(){
pid=`ps -ef | grep -v grep | grep -v ps | grep -i "/usr/bin/python ${BIN}" | awk '{print $2}'`
pid=`ps -ef | grep -v grep | grep -v ps | grep -i "${BIN}" | awk '{print $2}'`
if [ ! -z $pid ]; then
$BIN -c $conf -d stop
RETVAL=$?
@ -44,7 +44,7 @@ stop(){
}
status(){
pid=`ps -ef | grep -v grep | grep -v ps | grep -i "/usr/bin/python ${BIN}" | awk '{print $2}'`
pid=`ps -ef | grep -v grep | grep -v ps | grep -i "${BIN}" | awk '{print $2}'`
if [ -z $pid ]; then
echo "$name is not running"
RETVAL=1