Closed karishay closed 9 years ago
On Wed, May 27, 2015 at 02:13:40PM -0700, Shannon Burns wrote:
Init script requires full path You can view, comment on, or merge this pull request online at:
https://github.com/nginxinc/nginx-ldap-auth/pull/1
diff --git a/nginx-ldap-auth-daemon-ctl.sh b/nginx-ldap-auth-daemon-ctl.sh index 4f82b00..a44526f 100755 --- a/nginx-ldap-auth-daemon-ctl.sh +++ b/nginx-ldap-auth-daemon-ctl.sh @@ -1,7 +1,7 @@
!/bin/sh
-CMD=./nginx-ldap-auth-daemon.py -PIDFILE=./nginx-ldap-auth-daemon.pid +CMD=
pwd
/nginx-ldap-auth-daemon.py +PIDFILE=pwd
/nginx-ldap-auth-daemon.pidcase $1 in "start")
Hello,
Why do you think we need absolute paths here? The script is intended to run from the same directory where others.
We are not going to package this as init script, as in this case we have to know paths where we have installed other scripts (i.e. /usr/bin/blah)
adding pwd
does not allow to run this script from any directory, it
just adds current directory name, what is meaningless, because current
directory already have name, it is always '.' (dot).
because start-stop-daemon is not aware of the cwd in Ubuntu. A potentially better fix would be
CMD=$PWD/nginx-ldap-auth-daemon.py but Shannon's version works too
If @LinuxJedi 's approach is preferable, I'm happy to change it.
On Tue, Jun 02, 2015 at 09:29:41AM -0700, Shannon Burns wrote:
If @LinuxJedi 's approach is preferable, I'm happy to change it.
I've commited slightly modified version that should work ok on ubuntu.
Init script requires full path