From 37be5adf9cf76822c9c2850ec5f85f84adf8cb3b Mon Sep 17 00:00:00 2001 From: Vladimir Homutov Date: Fri, 22 Dec 2017 15:21:53 +0300 Subject: [PATCH] Added default redirection destination to /dev/stdout. When a nginx-ldap-auth-daemon.py is executed from console, its output is set to /dev/stdout by default. Otherwise, value of a 'LOG' variable is used, exported by wrapper script. --- nginx-ldap-auth-daemon.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nginx-ldap-auth-daemon.py b/nginx-ldap-auth-daemon.py index 2b529ce..169ac76 100755 --- a/nginx-ldap-auth-daemon.py +++ b/nginx-ldap-auth-daemon.py @@ -1,4 +1,5 @@ #!/bin/sh +''''[ -z $LOG ] && export LOG=/dev/stdout # ''' ''''which python2 >/dev/null && exec python2 -u "$0" "$@" >> $LOG 2>&1 # ''' ''''which python >/dev/null && exec python -u "$0" "$@" >> $LOG 2>&1 # '''