diff options
Diffstat (limited to '')
| -rw-r--r-- | auto/os/conf | 21 | ||||
| -rw-r--r-- | auto/os/linux | 6 |
2 files changed, 20 insertions, 7 deletions
diff --git a/auto/os/conf b/auto/os/conf index 568b718d2..f64483bda 100644 --- a/auto/os/conf +++ b/auto/os/conf @@ -47,7 +47,26 @@ if [ $NGX_PLATFORM != win32 ]; then if test -z "$NGX_USER"; then NGX_USER=nobody - NGX_GROUP=nobody + fi + + if [ -z "$NGX_GROUP" -a $NGX_USER = nobody ] ; then + if grep nobody /etc/group 2>&1 >/dev/null; then + echo "checking for nobody group ... found" + NGX_GROUP=nobody + else + echo "checking for nobody group ... not found" + + if grep nogroup /etc/group 2>&1 >/dev/null; then + echo "checking for nogroup group ... found" + NGX_GROUP=nogroup + else + echo "checking for nogroup group ... not found" + NGX_GROUP=nobody + fi + fi + + else + NGX_GROUP=$NGX_USER fi diff --git a/auto/os/linux b/auto/os/linux index 687377b6e..f3c6722c4 100644 --- a/auto/os/linux +++ b/auto/os/linux @@ -21,12 +21,6 @@ ngx_spacer=' CC_AUX_FLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64" -if test -z "$NGX_USER"; then - NGX_USER=nobody - NGX_GROUP=nogroup -fi - - # Linux kernel version version=`grep "#define LINUX_VERSION_CODE" /usr/include/linux/version.h \ |
