nginxinc / nginx-ldap-auth

Example of LDAP authentication using ngx_http_auth_request_module
BSD 2-Clause "Simplified" License
681 stars 202 forks source link

script does not start if $LOG is not set #35

Closed lesinigo closed 6 years ago

lesinigo commented 6 years ago

Trying to run the nginx-ldap-auth-daemon.py script without the $LOG environment variable set (e.g. for testing purposes) results in a not-so-useful sh error:

# /usr/bin/nginx-ldap-auth-daemon
/usr/bin/nginx-ldap-auth-daemon: line 2: $LOG: ambiguous redirect

The shell code at the beginning of the script should be changed to add a default value for $LOG and/or to emit an error message that explicitly says that variable is required.

vl-homutov commented 6 years ago

Thanks for reporting.

This was fixed, as well as bash-specific redirection used. Now the script uses stdout, if no LOG variable is set.