Fixed init script fails to get pandora_agent's pid on CentOS 2.x.

Without -w option, the centos 2.x version of ps (procps-2.0.7)
truncates long lines to 80 characters when output isn't a tty
and thus init script fails to get pid of pandora_agent..

(cherry picked from commit c71e75045e)
This commit is contained in:
KIKUCHI Koichiro 2016-02-18 05:02:00 +09:00 committed by KIKUCHI Koichiro
parent 6b841af730
commit 5679281bae
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ pidof_pandora () {
fi
done
else
PANDORA_PID=`ps -Af | grep "$DAEMON $PANDORA_PATH" | grep -v grep | awk '{ print $2 }'`
PANDORA_PID=`ps -Afw | grep "$DAEMON $PANDORA_PATH" | grep -v grep | awk '{ print $2 }'`
fi
echo $PANDORA_PID