Closed Kegeruneku closed 6 years ago
Thanks for reporting.
The issue with running script as is was fixed, now it writes a log to stdout.
I prefer to leave shebang as is, it was made on purpose: there is a total mess in distributions, 'python' can point both to 2 or 3rd version, so we first try explicitly 'python2', and if then simply 'python' in hope it is not v3.
Also we expect python2 or python to be in PATH, and test using 'which', rather than /usr/bin/env, which is known to happen in different places (/bin vs /usr/bin) as well on some systems. It is hard to say what is more robust 'which' or 'env' without exhaustive testing of systems, but practically this works and I wouldn't change until some real evidence of current implementaion is broken.
Running nginx-ldap-auth daemon as-is yields the following results:
I think it is a better idea to use env to select the python version to use, to prevent issues like this.
Moreover, as this project is advertised to support python 2 only, https://www.python.org/dev/peps/pep-0394/ recommends specifying 'python2' as interpreter