fix for nginx listing

This commit is contained in:
Serghey Rodin 2015-06-02 01:34:53 +03:00
commit 3c3a399fd6

View file

@ -31,7 +31,7 @@ get_srv_state() {
else
pids=$(pidof -x $proc_name |tr ' ' '|')
fi
if [ -z "$pids" ]; then
if [ -z "$pids" ] && [ "$proc_name" != 'nginx' ] ; then
#fallback to pgrep
pids=$(pgrep $proc_name |tr '\n' '|')
fi