gateway2/angie-Angie-1.11.8/auto/unix.group
2026-08-14 18:56:28 +08:00

40 lines
809 B
Plaintext

# Copyright (C) 2024 Web Server LLC
# Copyright (C) Igor Sysoev
# Copyright (C) Nginx, Inc.
if check_cache "unix group" "os"; then
return
fi
if [ $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
if [ $NGX_FEATURE_CACHE = NO ]; then
return
fi
cache_output_start
echo "ngx_found=yes"
echo "NGX_GROUP=$NGX_GROUP"
cache_output_end