fix --group= vs --user=

This commit is contained in:
Igor Sysoev 2006-11-06 18:39:28 +00:00
parent 5fd6d349c8
commit 80eec93a5f

View File

@ -4,7 +4,8 @@
NGX_USER=${NGX_USER:-nobody}
if [ -z "$NGX_GROUP" -a $NGX_USER = nobody ] ; then
if [ -z "$NGX_GROUP" ]; then
if [ $NGX_USER = nobody ]; then
if grep nobody /etc/group 2>&1 >/dev/null; then
echo "checking for nobody group ... found"
NGX_GROUP=nobody
@ -19,10 +20,10 @@ if [ -z "$NGX_GROUP" -a $NGX_USER = nobody ] ; then
NGX_GROUP=nobody
fi
fi
else
NGX_GROUP=$NGX_USER
fi
fi
ngx_feature="poll()"