|
From: Leif M. <le...@ta...> - 2004-12-06 09:50:13
|
Nick,
You stumbled onto a bug in the shell script. The problem is that
the paths to the wrapper
conf and pid files are relative. The shell script is expecting them to
be relative to the location
of the shell script, and thus home directory. After changing the
working directory, this is no
longer true.
I am still working on cleaning this up for the next release.
I have attached a shell script which will use fully qualified paths
for the locations of the
pid files and config file. The script assumes that the sh is in the
same directory as the
Wrapper binary.
In your case you are putting the shell in the root so you will need
to do a little more
work Change the value of the WRAPPER_CONF and PIDDIR variables in the
script
to appropriate values.
Then when you launch the Wrapper, rather than placing the
wrapper.working.dir
property in the wrapper.conf, either pass it in as a parameter.
"../../" for Windows
or "." for UNIX.
Another option is to leave it in the conf file, but use the value
"/". This assumes the
root on both platforms. (Is that really what you want in UNIX??)
I would appreciate your feedback on this and will try to get it
cleaned up for the
next release. I am debating modifying the UNIX version of the Wrapper
so that
it starts with forcing the working directory to the location of the
binary as is done
on Windows. It would be an incompatibility, but it would clean things
up in the
long run...
Cheers,
Leif
nic...@uk... wrote:
>Hi,
>
>I am trying to get my app working under windows and linux with the same
>config & behaviour
>
>My dir structure looks like this
>{root}/MyApp.sh
>{root}/MyApp.bat
>{root}/wrapper/bin
>{root}/wrapper/conf
>{root}/wrapper/lib
>
>1) I want my scripts are outside of bin - {root}
>2) I want my running dir is outside of bin - {root}
>
>I have modified the scripts to find the wrapper(.exe) binary & config from
>where they are.
>I have set the wrapper.working.dir property to ../../ - in order to make it
>run in the {root} dir.
>On windows my config works fine. If I leave the unmodified scripts in the
>{root}/wrapper/bin everything works fine also.
>
>But on linux, the problem I have is that the wrapper binary doesnt start in
>./wrapper/bin - and hence ../../ doesnt make sense - and all paths in the
>wrapper.conf are off.
>What I am struggling with is how to modify the script so that it runs the
>wrapper binary in the {root}/wrapper/bin dir rather than the current dir.
>
>Thanks.
>
>-Nick
>
>
|