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..
This commit is contained in:
KIKUCHI Koichiro 2016-02-18 05:02:00 +09:00
parent 03df2f8303
commit c71e75045e
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