Update comments

Signed-off-by: Teddysun <i@teddysun.com>
This commit is contained in:
Teddysun 2018-06-05 08:43:21 +09:00
parent 570dbb10f9
commit de963fbfa6
No known key found for this signature in database
GPG Key ID: 09BD4C080AD6C46D
2 changed files with 4 additions and 4 deletions

View File

@ -24,8 +24,8 @@ fi
RETVAL=0
check_running(){
PID=`ps -ef | grep -v grep | grep -i "${BIN}" | awk '{print $2}'`
if [ ! -z "$PID" ]; then
PID=$(ps -ef | grep -v grep | grep -i "${BIN}" | awk '{print $2}')
if [ -n "$PID" ]; then
return 0
else
return 1

View File

@ -22,8 +22,8 @@ fi
RETVAL=0
check_running(){
PID=`ps -ef | grep -v grep | grep -i "${BIN}" | awk '{print $2}'`
if [ ! -z $PID ]; then
PID=$(ps -ef | grep -v grep | grep -i "${BIN}" | awk '{print $2}')
if [ -n "$PID" ]; then
return 0
else
return 1