According to [EMAIL PROTECTED]:
> I want to use ht://Dig on my new Webserver. In my configuration
> of the htsearch file I have to change the path of the default configuration
> file ( the old one : CONFIG_DIR/htdig.conf ).
> I already read the faq-files especially 5.30 and 4.20. It is not possible to
> change CONFIG_DIR in the CONFIG file in my source directory , and then
> recompile and reinstall because this will cost too much time. The last possibility
> I see is to set up a wrapper script as mentioned in the faq-files. In "faq -
> 5.30" there are some hints how to create this wrapper script. I tried to
> build this script by using these information, but I wasn’t successful.
>
> Is there any link where I can find an example for a workable wrapper-script,
> or can you explain the strategy in some other words more detailed ?
I think the reason there are so few examples of this available is because
the description makes it fairly obvious to anyone who's written a shell
script before. Here's a two line shell script that should do what you
ask. Just change the directory name to what you want, move the htsearch
binary to htsearch-real, call the script "htsearch", and add execute
permission to it (chmod +x htsearch):
#!/bin/sh
CONFIG_DIR=/home/me/htdig/configs "$0"-real ${@+"$@"}
The only thing tricky about the script above is understanding what the
'${@+"$@"}' construct means. This is actually a handy little device
which will pass each argument to the script directly to the program
the script calls, without the shell trying to parse these arguments.
The "$@" construct, in double quotes, does this too, but an unfortunate
side-effect of "$@" is that if there are no arguments to the script,
"$@" still expands to a single empty string, which may be undesirable.
The extra stuff around it means only use this variable if it's set,
so if there are no arguments to the script, none will be given to the
program either.
> Do you see another way to parameterize the htsearch-file to take hold on a
> static-self created htconf-file ?
Your other option is to stick with the CONFIG_DIR value that's compiled-in
to htsearch. You can also make subdirectories in this directory, or
have symbolic links from this directory to other files or directories, so
you do still have a lot of flexibility with this. The big restriction,
though, is that you must have write access to the CONFIG_DIR to do any
of this setup. This is for security reasons, so that a user of your web
site can't bypass the CONFIG_DIR with a cleverly-crafted value of the
"config" input parameter to htsearch. If you don't have write access to
this directory, you have to stick to the config file name(s) that your
service provider sets up for you, or use a wrapper script.
--
Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/
Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada)
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html