source: main/tags/2.37-cdrom/gsdl/Install.sh

Last change on this file was 2864, checked in by sjboddie, 22 years ago

* empty log message *

  • Property svn:executable set to *
  • Property svn:mime-type set to application/octet-stream
File size: 35.1 KB
Line 
1#!/bin/sh
2
3## Install.sh -- Install Greenstone
4
5cmd_cp="cp"
6cmd_cpr="cp -r"
7cmd_chmod="chmod"
8cmd_mkdir="mkdir -p"
9cmd_ln="ln -s"
10cmd_mv="mv"
11cmd_rm="rm -i"
12cmd_rmr="rm -r"
13
14thisdir=`pwd`
15cd ..
16cd_dir=`pwd`
17cd "$thisdir"
18
19# script must be run from within cdrom/unix directory
20if [ ! -f "${thisdir}/Install.sh" ]; then
21 echo "$itext1"
22 echo "$itext0"
23 exit 1
24fi
25
26# check that various important directories are on the cd
27if [ ! -d "${cd_dir}/gsdl" ]; then
28 echo
29 echo "${itext2}${cd_dir}/gsdl"
30 echo "$itext0"
31 exit 1
32fi
33if [ ! -d "${cd_dir}/Unix/bin/linux" ]; then
34 echo
35 echo "${itext2}${cd_dir}/Unix/bin/linux"
36 echo "$itext0"
37 exit 1
38fi
39
40# install to /usr/local by default if user is "root", otherwise
41# default to users home directory
42gsdlos=`uname | tr A-Z a-z`
43if [ "$gsdlos" = "linux" ]; then
44 logname=`whoami`
45else
46 logname=""
47fi
48if [ "$logname" = "" ]; then
49 logname=`logname`
50fi
51gsdlhome="/home/${logname}"
52if [ "$logname" = "root" ]; then
53 gsdlhome="/usr/local"
54fi
55
56
57itext0="Greenstone was not installed"
58
59itext1="Install.sh must be run from the directory in which it resides"
60
61itext2="ERROR: Could not locate "
62
63itext3="This script will install Greenstone on your system. You may want
64to skim through the Install.pdf document that resides in the docs
65directory on this cd-rom before continuing with the installation.
66
67Note that when prompted for input, hitting \"enter\" will select
68the default (given in square brackets [] at the end of each question).
69If you're unsure which option to select, use the default.
70
71Note also that Install.sh prints out information on any commands
72it runs on your system in the form \"--> Install.sh: [command]\".
73
74It is assumed throughout this installation procedure that you
75have a webserver installed on your system.
76
77For later reference the output of this install script will be
78recorded in a file called INSTALL_RECORD in the directory into
79which you choose to install Greenstone.
80
81Continue? [y]"
82
83itext4="
84Which directory should Greenstone be installed to?
85Make sure that this directory is on a partition with sufficient
86free disk space for the installation options you intend selecting."
87
88itext5="
89 * A linux binary installation requires approximately
90 40Mb."
91
92itext6="
93 * Compiling Greenstone from source code requires
94 approximately 155Mb.
95 * Optional Greenstone demonstration collections may use up
96 to a further 200Mb (you'll be told the size of each individual
97 collection before you install it).
98 * Online documentation requires a further 4Mb.
99 * Enabling Greenstone's \"CD exporting\" function requires a
100 further 24Mb.
101Enter directory to install Greenstone into. A gsdl directory
102will be created in this directory. [${gsdlhome}]"
103
104itext34="
105Enter existing cgi executable directory [/usr/local/apache/cgi-bin]"
106
107
108# get gsdlhome
109echo "$itext3"
110printf "%s" "> "
111read ans
112log="${log}${itext3}
113> $ans
114"
115if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
116 echo "$itext0"
117 exit 0
118fi
119
120msg="$itext4"
121if [ "$gsdlos" = "linux" ]; then
122msg="${msg}$itext5"
123fi
124msg="${msg}$itext6"
125echo "$msg"
126printf "%s" "> "
127read ans
128log="${log}${msg}
129> $ans
130"
131if [ "$ans" != "" ]; then
132 gsdlhome="$ans"
133fi
134
135itext7="
136Warning: The ${gsdlhome} directory does not exist.
137Create it? [y]"
138
139itext8="ERROR: failed to create $gsdlhome directory"
140
141if [ ! -d "$gsdlhome" ]; then
142 echo "$itext7"
143 printf "%s" "> "
144 read ans
145 log="${log}${itext7}
146> $ans
147"
148 if [ "$ans" = "" ]; then
149 ans="y"
150 fi
151 if [ "$ans" = "y" ]; then
152 msg="--> Install.sh: [$cmd_mkdir \"$gsdlhome\"]"
153 echo "$msg"
154 log="${log}${msg}
155"
156 $cmd_mkdir "$gsdlhome"
157 if [ ! -d "$gsdlhome" ]; then
158 echo "$itext8"
159 echo "$itext0"
160 exit 1
161 fi
162 else
163 echo "$itext0"
164 exit 0
165 fi
166fi
167
168# from now on $gsdlhome includes the "/gsdl"
169gsdlhome="${gsdlhome}/gsdl"
170
171itext9="
172If this installation fails or is cancelled, run the uninstall
173script (${gsdlhome}/Uninstall.sh) to clean up the partial
174installation.
175Continue? [y]"
176
177itext10="
178Installing Greenstone directory structure to ${gsdlhome}"
179
180itext11="
181Would you like to install the Greenstone documentation to your
182hard drive? The docs will use about 4Mb of space. If you choose
183not to install them you can still access them from within the
184docs directory of the cd-rom) [y]"
185
186itext12="
187Would you like to install support for Greenstone's \"CD exporting\"
188function? This function allows you to export a Greenstone collection
189in a form suitable for writing to a self-installing Windows cd-rom.
190This package will use approximately 23Mb of disk space [n]"
191
192itext13="
193The Greenstone demonstration collection has been installed. Would you
194like to install any other collections from the installation cd-rom? [y]
195(note that only the built indexes will be installed for these
196collections - if you require the original source documents you may
197manually copy them from the \"collect\" directory of the cd-rom)"
198
199itext14="
200Install the Greenstone mailing list archive (gsarch) - 3Mb? [y]"
201
202itext15="
203Install the MSWord/PDF/RTF/Postscript demonstration collection (wordpdf) - 4Mb? [y]"
204
205itext16="
206Install the Chinese demonstration collection (chinese) - 6Mb? [y]"
207
208itext17="
209Install the Humanity Development Library subset (hdlsub) - 130 Mb? [y]"
210
211itext18="Setting permissions ..."
212
213itext19="
214In order for end-user collection building to be enabled the
215Greenstone cgi program must be able to write to the
216${gsdlhome}/collect and ${gsdlhome}/tmp directories.
217On most systems this means they must be globally writable.
218Make these directories globally writable? [y]"
219
220itext20="
221You may either install pre-compiled, statically linked linux [b]inaries
222(i386 only) or install and [c]ompile the Greenstone source code"
223
224itext21="Enter \"[b]\" or \"c\""
225
226itext22="Installing linux binaries"
227
228itext23="Installing source code"
229
230itext24="configuring ..."
231
232itext25="compiling ..."
233
234itext26="installing ..."
235
236itext27="ERROR: Compilation failed"
237
238itext28="
239
240Greenstone needs a valid cgi executable directory (normally called
241cgi-bin on unix systems) from which to run.
242This may be either:
243 1. The default Greenstone cgi-bin directory (${gsdlhome}/cgi-bin).
244 If you use the Greenstone default you will need to configure
245 your webserver to treat this directory as a cgi executable
246 directory. For the Apache webserver you use the ScriptAlias
247 directive to do this (details of how to configure your webserver
248 will be displayed at the end of this installation procedure)."
249
250itext29=" Note that you will probably need help from your system
251 administrator to reconfigure your webserver."
252
253itext30=" 2. An existing cgi-bin directory. Normally a cgi-bin directory
254 is created when your webserver is installed. Typically, this
255 might be /home/httpd/cgi-bin, or /usr/local/apache/cgi-bin, or
256 /var/lib/apache/cgi-bin."
257
258itext31=" Many systems also allow individual users to have their own
259 cgi-bin in /home/username/public_html/cgi-bin."
260
261itext32="Enter \"[1]\" or \"2\""
262
263itext33="
264Don't forget to configure your webserver to treat ${gsdlhome}/cgi-bin
265as a cgi executable directory. Don't worry, you'll be
266reminded of this again at the end of the installation
267procedure"
268
269itext37="Run the uninstall script (${gsdlhome}/Uninstall.sh)
270to clean up the partial installation."
271
272itext42="
273
274In order for Greenstone to run, the $gsdlhome
275directory and all it contains must be accessible from the web.
276To make this happen you may either:
277 1. Configure your webserver so that $gsdlhome
278 is itself accessible from the web."
279
280itext43=" 2. Provide an existing web accessible directory from which
281 a symbolic link (ln -s) will be made to $gsdlhome.
282 When your server was installed a web accessible directory
283 will have been created (the Apache webserver uses the
284 DocumentRoot directive to define this directory). Typically
285 this directory might be /home/httpd/html, or /usr/local/apache/htdocs,
286 or /var/lib/apache/htdocs."
287
288itext44=" Many systems also allow individual users to have their own
289 web accessible directory in /home/username/public_html."
290
291itext45=" Note that your web server will need to be configured to allow
292 symbolic links from within this directory. For the Apache
293 server that means this directory must be configured with
294 the SymLinksIfOwnerMatch or FollowSymLinks option (most Apache
295 installations are configured this way by default)."
296
297itext46="
298Don't forget to configure your webserver to make $gsdlhome
299accessible from the web. You'll be reminded of this again
300at the end of this installation procedure."
301
302
303msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}\"]"
304echo "$msg"
305log="${log}${msg}
306"
307$cmd_mkdir "$gsdlhome"
308if [ ! -d "$gsdlhome" ]; then
309 echo "$itext8"
310 echo "$itext0"
311 exit 1
312fi
313# set permissions on gsdlhome directory
314msg="--> Install.sh: [$cmd_chmod u+rwx \"${gsdlhome}\"]"
315echo "$msg"
316log="${log}${msg}
317"
318$cmd_chmod u+rwx "$gsdlhome"
319
320# create initial Uninstall.sh
321cd "$gsdlhome"
322echo "#!/bin/sh" > Uninstall.sh
323echo "" >> Uninstall.sh
324echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh
325echo "read ans" >> Uninstall.sh
326echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> Uninstall.sh
327echo " $cmd_chmod -R u+rwx \"$gsdlhome\"" >> Uninstall.sh
328echo " $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh
329echo "fi" >> Uninstall.sh
330$cmd_chmod u+x Uninstall.sh
331cd "$thisdir"
332
333# create initial INSTALL_RECORD
334echo "$log" >> "${gsdlhome}/INSTALL_RECORD"
335
336echo "$itext9"
337echo "$itext9" >> "${gsdlhome}/INSTALL_RECORD"
338printf "%s" "> "
339read ans
340echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
341if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
342 msg="$itext0"
343 echo "$msg"
344 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
345 exit 0
346fi
347
348echo "$itext10"
349echo "$itext10" >> "${gsdlhome}/INSTALL_RECORD"
350
351# copy gsdl directory across
352msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/gsdl/\"* \"$gsdlhome\"]"
353echo "$msg"
354echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
355$cmd_cpr "${cd_dir}/gsdl/"* "$gsdlhome"
356
357# copy setup shell scripts across too
358msg="--> Install.sh: [$cmd_cp \"${cd_dir}/src/Unix/setup.\"* \"$gsdlhome\"]"
359echo "$msg"
360echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
361$cmd_cp "${cd_dir}/src/Unix/setup."* "$gsdlhome"
362
363# make sure we have a tmp directory
364if [ ! -d "$gsdlhome/tmp" ]; then
365 msg="--> Install.sh: [$cmd_mkdir \"$gsdlhome/tmp\"]"
366 echo "$msg"
367 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
368 $cmd_mkdir "${gsdlhome}/tmp"
369fi
370
371# make collect directory writable so we can install collections
372msg="--> Install.sh: [$cmd_chmod u+rwx \"$gsdlhome/collect\"]"
373echo "$msg"
374echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
375$cmd_chmod u+rwx "$gsdlhome/collect"
376
377# do we want docs directory?
378echo "$itext11"
379echo "$itext11" >> "${gsdlhome}/INSTALL_RECORD"
380printf "%s" "> "
381read ans
382echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
383if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
384 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/docs\" \"$gsdlhome\"]"
385 echo "$msg"
386 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
387 $cmd_cpr "${cd_dir}/docs" "$gsdlhome"
388fi
389
390# do we want the "CD exporting" stuff?
391echo "$itext12"
392echo "$itext12" >> "${gsdlhome}/INSTALL_RECORD"
393printf "%s" "> "
394read ans
395echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
396if [ "$ans" = "Y" ] || [ "$ans" = "y" ]; then
397 msg="--> Install.sh: [$cmd_chmod u+rw \"${gsdlhome}/bin\"]"
398 echo "$msg"
399 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
400 $cmd_chmod u+rw "${gsdlhome}/bin"
401
402 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/bin/windows\"]"
403 echo "$msg"
404 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
405 $cmd_mkdir "${gsdlhome}/bin/windows"
406
407 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/netscape\" \"${gsdlhome}/bin/windows\"]"
408 echo "$msg"
409 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
410 $cmd_cpr "${cd_dir}/Windows/bin/windows/netscape" "${gsdlhome}/bin/windows"
411
412 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/Win32s\" \"${gsdlhome}/bin/windows\"]"
413 echo "$msg"
414 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
415 $cmd_cpr "${cd_dir}/Windows/bin/windows/Win32s" "${gsdlhome}/bin/windows"
416
417 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/net16\" \"${gsdlhome}/bin/windows\"]"
418 echo "$msg"
419 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
420 $cmd_cpr "${cd_dir}/Windows/bin/windows/net16" "${gsdlhome}/bin/windows"
421
422 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/net32\" \"${gsdlhome}/bin/windows\"]"
423 echo "$msg"
424 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
425 $cmd_cpr "${cd_dir}/Windows/bin/windows/net32" "${gsdlhome}/bin/windows"
426
427 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/server.exe\" \"${gsdlhome}/bin/windows\"]"
428 echo "$msg"
429 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
430 $cmd_cp "${cd_dir}/Windows/bin/windows/server.exe" "${gsdlhome}/bin/windows"
431
432 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/gssetup.exe\" \"${gsdlhome}/bin/windows\"]"
433 echo "$msg"
434 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
435 $cmd_cp "${cd_dir}/Windows/bin/windows/gssetup.exe" "${gsdlhome}/bin/windows"
436
437 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/setpw.exe\" \"${gsdlhome}/bin/windows\"]"
438 echo "$msg"
439 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
440 $cmd_cp "${cd_dir}/Windows/bin/windows/setpw.exe" "${gsdlhome}/bin/windows"
441
442 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/Setup.exe\" \"${gsdlhome}/bin/windows\"]"
443 echo "$msg"
444 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
445 $cmd_cp "${cd_dir}/Windows/bin/windows/Setup.exe" "${gsdlhome}/bin/windows"
446fi
447
448
449# which collections do we want
450cd "${cd_dir}/collect"
451echo "$itext13"
452echo "$itext13" >> "${gsdlhome}/INSTALL_RECORD"
453printf "%s" "> "
454read ans
455echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
456if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
457
458 # gsarch
459 echo "$itext14"
460 echo "$itext14" >> "${gsdlhome}/INSTALL_RECORD"
461 printf "%s" "> "
462 read ans
463 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
464 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
465
466 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/collect/gsarch\"]"
467 echo "$msg"
468 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
469 $cmd_mkdir "${gsdlhome}/collect/gsarch"
470
471 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/gsarch/etc\" \"${gsdlhome}/collect/gsarch\"]"
472 echo "$msg"
473 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
474 $cmd_cpr "${cd_dir}/collect/gsarch/etc" "${gsdlhome}/collect/gsarch"
475
476 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/gsarch/images\" \"${gsdlhome}/collect/gsarch\"]"
477 echo "$msg"
478 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
479 $cmd_cpr "${cd_dir}/collect/gsarch/images" "${gsdlhome}/collect/gsarch"
480
481 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/gsarch/index\" \"${gsdlhome}/collect/gsarch\"]"
482 echo "$msg"
483 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
484 $cmd_cpr "${cd_dir}/collect/gsarch/index" "${gsdlhome}/collect/gsarch"
485 fi
486
487 # wordpdf
488 echo "$itext15"
489 echo "$itext15" >> "${gsdlhome}/INSTALL_RECORD"
490 printf "%s" "> "
491 read ans
492 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
493 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
494
495 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/collect/wordpdf\"]"
496 echo "$msg"
497 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
498 $cmd_mkdir "${gsdlhome}/collect/wordpdf"
499
500 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/wordpdf/etc\" \"${gsdlhome}/collect/wordpdf\"]"
501 echo "$msg"
502 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
503 $cmd_cpr "${cd_dir}/collect/wordpdf/etc" "${gsdlhome}/collect/wordpdf"
504
505 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/wordpdf/images\" \"${gsdlhome}/collect/wordpdf\"]"
506 echo "$msg"
507 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
508 $cmd_cpr "${cd_dir}/collect/wordpdf/images" "${gsdlhome}/collect/wordpdf"
509
510 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/wordpdf/index\" \"${gsdlhome}/collect/wordpdf\"]"
511 echo "$msg"
512 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
513 $cmd_cpr "${cd_dir}/collect/wordpdf/index" "${gsdlhome}/collect/wordpdf"
514 fi
515
516 # chinese
517 echo "$itext16"
518 echo "$itext16" >> "${gsdlhome}/INSTALL_RECORD"
519 printf "%s" "> "
520 read ans
521 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
522 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
523
524 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/collect/chinese\"]"
525 echo "$msg"
526 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
527 $cmd_mkdir "${gsdlhome}/collect/chinese"
528
529 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/chinese/etc\" \"${gsdlhome}/collect/chinese\"]"
530 echo "$msg"
531 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
532 $cmd_cpr "${cd_dir}/collect/chinese/etc" "${gsdlhome}/collect/chinese"
533
534 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/chinese/images\" \"${gsdlhome}/collect/chinese\"]"
535 echo "$msg"
536 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
537 $cmd_cpr "${cd_dir}/collect/chinese/images" "${gsdlhome}/collect/chinese"
538
539 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/chinese/index\" \"${gsdlhome}/collect/chinese\"]"
540 echo "$msg"
541 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
542 $cmd_cpr "${cd_dir}/collect/chinese/index" "${gsdlhome}/collect/chinese"
543 fi
544
545 # hdlsub
546 echo "$itext17"
547 echo "$itext17" >> "${gsdlhome}/INSTALL_RECORD"
548 printf "%s" "> "
549 read ans
550 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
551 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
552
553 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/collect/hdlsub\"]"
554 echo "$msg"
555 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
556 $cmd_mkdir "${gsdlhome}/collect/hdlsub"
557
558 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/hdlsub/etc\" \"${gsdlhome}/collect/hdlsub\"]"
559 echo "$msg"
560 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
561 $cmd_cpr "${cd_dir}/collect/hdlsub/etc" "${gsdlhome}/collect/hdlsub"
562
563 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/hdlsub/images\" \"${gsdlhome}/collect/hdlsub\"]"
564 echo "$msg"
565 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
566 $cmd_cpr "${cd_dir}/collect/hdlsub/images" "${gsdlhome}/collect/hdlsub"
567
568 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/hdlsub/index\" \"${gsdlhome}/collect/hdlsub\"]"
569 echo "$msg"
570 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
571 $cmd_cpr "${cd_dir}/collect/hdlsub/index" "${gsdlhome}/collect/hdlsub"
572 fi
573fi
574
575# set permissions
576msg="
577$itext18
578--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]
579--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/bin/script/\"*]"
580echo "$msg"
581echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
582$cmd_chmod -R u+rw "$gsdlhome"
583$cmd_chmod a+x "${gsdlhome}/bin/script/"*
584
585# certain files in gsdl/etc need to be globally writable
586msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/errout.txt\"]"
587echo "$msg"
588echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
589$cmd_chmod a+w "$gsdlhome/etc/errout.txt"
590msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/initout.txt\"]"
591echo "$msg"
592echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
593$cmd_chmod a+w "$gsdlhome/etc/initout.txt"
594msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/key.db\"]"
595echo "$msg"
596echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
597$cmd_chmod a+w "$gsdlhome/etc/key.db"
598msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/users.db\"]"
599echo "$msg"
600echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
601$cmd_chmod a+w "$gsdlhome/etc/users.db"
602msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/main.cfg\"]"
603echo "$msg"
604echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
605$cmd_chmod a+w "$gsdlhome/etc/main.cfg"
606msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/history.db\"]"
607echo "$msg"
608echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
609$cmd_chmod a+w "$gsdlhome/etc/history.db"
610msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/usage.txt\"]"
611echo "$msg"
612echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
613$cmd_chmod a+w "$gsdlhome/etc/usage.txt"
614
615
616# should gsdl/collect and gsdl/tmp be globally writable?
617echo "$itext19"
618echo "$itext19" >> "${gsdlhome}/INSTALL_RECORD"
619printf "%s" "> "
620read ans
621echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
622if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
623 msg="--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/collect\"]"
624 echo "$msg"
625 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
626 $cmd_chmod -R a+w "$gsdlhome/collect"
627 msg="--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/tmp\"]"
628 echo "$msg"
629 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
630 $cmd_chmod -R a+w "$gsdlhome/tmp"
631fi
632
633# binaries or source code?
634compile="yes"
635if [ "$gsdlos" = "linux" ]; then
636 echo "$itext20"
637 echo "$itext20" >> "${gsdlhome}/INSTALL_RECORD"
638
639 found=no
640 while [ "$found" = "no" ]; do
641 echo "$itext21"
642 echo "$itext21" >> "${gsdlhome}/INSTALL_RECORD"
643 printf "%s" "> "
644 read ans
645 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
646 if [ "$ans" = "" ] || [ "$ans" = "b" ]; then
647 compile="no"
648 # install binaries
649 msg="
650$itext22
651--> Install.sh: [$cmd_cpr \"${cd_dir}/Unix/bin/linux\" \"${gsdlhome}/bin\"]"
652 echo "$msg"
653 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
654 $cmd_cpr "${cd_dir}/Unix/bin/linux" "${gsdlhome}/bin"
655 msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/bin/linux/\"*]"
656 echo "$msg"
657 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
658 $cmd_chmod a+x "${gsdlhome}/bin/linux/"*
659 msg="--> Install.sh: [$cmd_chmod -R u+rw \"${gsdlhome}/bin/linux\"]"
660 echo "$msg"
661 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
662 $cmd_chmod -R u+rw "${gsdlhome}/bin/linux"
663
664 # move library executable to cgi-bin
665 msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/bin/linux/library\" \"${gsdlhome}/cgi-bin\"]"
666 echo "$msg"
667 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
668 $cmd_mv "${gsdlhome}/bin/linux/library" "${gsdlhome}/cgi-bin"
669
670 # move XML.tgz to perllib/cpan and untar it
671 msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/bin/linux/XML.tgz\" \"${gsdlhome}/perllib/cpan\"]"
672 echo "$msg"
673 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
674 $cmd_mv "${gsdlhome}/bin/linux/XML.tgz" "${gsdlhome}/perllib/cpan"
675 cd "${gsdlhome}/perllib/cpan"
676 msg="--> Install.sh: [gzip -dc XML.tgz | tar -xf -]"
677 echo "$msg"
678 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
679 gzip -dc XML.tgz | tar -xf -
680
681 found="yes"
682 elif [ "$ans" = "c" ]; then
683 found="yes"
684 fi
685 done
686fi
687
688if [ "$compile" = "yes" ]; then
689 # install source
690 msg="
691$itext23
692--> Install.sh: [$cmd_cpr \"${cd_dir}/src/lib\" \"$gsdlhome\"]"
693 echo "$msg"
694 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
695 $cmd_cpr "${cd_dir}/src/lib" "$gsdlhome"
696 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/src/packages\" \"$gsdlhome\"]"
697 echo "$msg"
698 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
699 $cmd_cpr "${cd_dir}/src/packages" "$gsdlhome"
700 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/src/src\" \"$gsdlhome\"]"
701 echo "$msg"
702 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
703 $cmd_cpr "${cd_dir}/src/src" "$gsdlhome"
704 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/src/Unix/\"* \"$gsdlhome\"]"
705 echo "$msg"
706 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
707 $cmd_cpr "${cd_dir}/src/Unix/"* "$gsdlhome"
708 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/src/Install.txt\" \"$gsdlhome\"]"
709 echo "$msg"
710 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
711 $cmd_cp "${cd_dir}/src/Install.txt" "$gsdlhome"
712 msg="--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]"
713 echo "$msg"
714 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
715 $cmd_chmod -R u+rw "$gsdlhome"
716 msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/configure\"]"
717 echo "$msg"
718 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
719 $cmd_chmod a+x "${gsdlhome}/configure"
720 msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/packages/yaz/configure\"]"
721 echo "$msg"
722 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
723 $cmd_chmod a+x "${gsdlhome}/packages/yaz/configure"
724
725 # compile it
726 msg="--> Install.sh: [cd $gsdlhome]"
727 echo "$msg"
728 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
729 cd "$gsdlhome"
730 msg="$itext24
731
732--> Install.sh: [./configure]"
733 echo "$msg"
734 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
735 ./configure
736 msg="$itext25
737
738--> Install.sh: [make]"
739 echo "$msg"
740 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
741 make
742 msg="$itext26
743
744--> Install.sh: [make install]"
745 echo "$msg"
746 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
747 make install
748 msg="--> Install.sh: [cd $thisdir]"
749 echo "$msg"
750 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
751 cd "$thisdir"
752
753 # check that things compiled ok
754 if [ ! -f "${gsdlhome}/cgi-bin/library" ]; then
755 msg="$itext27
756$itext0
757$itext37"
758 echo "$msg"
759 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
760 exit 1
761 fi
762fi
763
764
765# try to find out hostname
766if [ "$gsdlos" = "linux" ]; then
767 hostname=`hostname -f`
768 if [ "$hostname" = "" ]; then
769 hostname=`hostname -i`
770 fi
771fi
772if [ "$hostname" = "" ]; then
773 hostname=`hostname`
774fi
775if [ "$hostname" = "" ]; then
776 hostname="your-computer-name"
777fi
778
779
780# get cgi-bin directory
781echo "$itext28"
782echo "$itext28" >> "${gsdlhome}/INSTALL_RECORD"
783if [ "$logname" != "root" ]; then
784 echo "$itext29"
785 echo "$itext29" >> "${gsdlhome}/INSTALL_RECORD"
786fi
787echo "$itext30"
788echo "$itext30" >> "${gsdlhome}/INSTALL_RECORD"
789if [ "$logname" != "root" ]; then
790 echo "$itext31"
791 echo "$itext31" >> "${gsdlhome}/INSTALL_RECORD"
792fi
793found=no
794remind_cgi="no"
795remind_cgi_nomove="no"
796while [ "$found" = "no" ]; do
797 echo "$itext32"
798 echo "$itext32" >> "${gsdlhome}/INSTALL_RECORD"
799 printf "%s" "> "
800 read ans
801 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
802 if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
803 found="option1"
804 cgi_bin="${gsdlhome}/cgi-bin"
805 # default gsdl cgi-bin, do nothing
806
807 echo "$itext33"
808 echo "$itext33" >> "${gsdlhome}/INSTALL_RECORD"
809 remind_cgi="yes"
810 elif [ "$ans" = "2" ]; then
811 found="option2"
812 # external cgi-bin
813
814 echo "$itext34"
815 echo "$itext34" >> "${gsdlhome}/INSTALL_RECORD"
816 printf "%s" "> "
817 read ans
818 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
819 if [ "$ans" = "" ]; then
820 cgi_bin="/usr/local/apache/cgi-bin"
821 else
822 cgi_bin="$ans"
823 fi
824
825itext35="Warning: The ${cgi_bin} directory does not exist.
826Create it? [y]"
827
828itext36="Don't forget to configure your webserver to treat $cgi_bin
829as a cgi executable directory. Don't worry, you'll be
830reminded of this again at the end of the installation
831procedure"
832
833itext38="ERROR: failed to create $cgi_bin directory"
834
835itext39="
836Unable to write to $cgi_bin directory. You will need
837to copy the contents of ${gsdlhome}/cgi-bin
838to $cgi_bin after this installation is completed.
839You'll be reminded of this again at the end of the
840installation procedure."
841
842itext40="
843Installing Greenstone cgi programs in $cgi_bin"
844
845 if [ ! -d "$cgi_bin" ]; then
846
847 echo "$itext35"
848 echo "$itext35" >> "${gsdlhome}/INSTALL_RECORD"
849 printf "%s" "> "
850 read ans
851 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
852 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
853 msg="--> Install.sh: [$cmd_mkdir \"$cgi_bin\"]"
854 echo "$msg"
855 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
856 $cmd_mkdir "$cgi_bin"
857 if [ -d "$cgi_bin" ]; then
858 echo "$itext36"
859 echo "$itext36" >> "${gsdlhome}/INSTALL_RECORD"
860 remind_cgi="yes"
861 else
862 msg="$itext38
863$itext0
864$itext37"
865 echo "$msg"
866 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
867 exit 1
868 fi
869 fi
870 fi
871
872 if [ ! -w "$cgi_bin" ]; then
873 echo "$itext39"
874 echo "$itext39" >> "${gsdlhome}/INSTALL_RECORD"
875 remind_cgi_nomove="yes"
876 else
877 # install cgi-bin stuff (update the uninstall script first)
878 cd "$gsdlhome"
879 echo "#!/bin/sh" > Uninstall.sh
880 echo "" >> Uninstall.sh
881 echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> Uninstall.sh
882 echo "$cmd_rm \"${cgi_bin}/library\"" >> Uninstall.sh
883 echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh
884 echo "read ans" >> Uninstall.sh
885 echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> Uninstall.sh
886 echo " $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh
887 echo "fi" >> Uninstall.sh
888 $cmd_chmod u+x Uninstall.sh
889 cd "$thisdir"
890
891 msg="$itext40
892--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/gsdlsite.cfg\" \"$cgi_bin\"]"
893 echo "$msg"
894 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
895 $cmd_mv "${gsdlhome}/cgi-bin/gsdlsite.cfg" "$cgi_bin"
896 msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/library\" \"$cgi_bin\"]"
897 echo "$msg"
898 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
899 $cmd_mv "${gsdlhome}/cgi-bin/library" "$cgi_bin"
900 fi
901 fi
902done
903
904# web address of cgi-bin
905web_cgi="http://${hostname}/cgi-bin"
906if [ "$found" = "option1" ]; then
907 web_cgi="http://${hostname}/gsdl/cgi-bin"
908fi
909
910itext41="
911Please enter the web address of the $cgi_bin
912directory. Typically this might be http://localhost/cgi-bin,
913or http://127.0.0.1/cgi-bin, or http://your-computer-name/cgi-bin,
914or http://nnn.nnn.nnn.nn/cgi-bin. [$web_cgi]"
915
916echo "$itext41"
917echo "$itext41" >> "${gsdlhome}/INSTALL_RECORD"
918printf "%s" "> "
919read ans
920echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
921if [ "$ans" != "" ]; then
922 web_cgi="$ans"
923fi
924
925# get public_html directory
926echo "$itext42"
927echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
928if [ "$logname" != "root" ]; then
929 echo "$itext29"
930 echo "$itext29" >> "${gsdlhome}/INSTALL_RECORD"
931fi
932echo "$itext43"
933echo "$itext43" >> "${gsdlhome}/INSTALL_RECORD"
934if [ "$logname" != "root" ]; then
935 echo "$itext44"
936 echo "$itext44" >> "${gsdlhome}/INSTALL_RECORD"
937fi
938echo "$itext45"
939echo "$itext45" >> "${gsdlhome}/INSTALL_RECORD"
940found="no"
941remind_ph="no"
942remind_ph_nolink="no"
943while [ "$found" = "no" ]; do
944 echo "$itext32"
945 echo "$itext32" >> "${gsdlhome}/INSTALL_RECORD"
946 printf "%s" "> "
947 read ans
948 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
949 if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
950 found="yes"
951 public_html="$gsdlhome"
952 # no link
953 echo "$itext46"
954 echo "$itext46" >> "${gsdlhome}/INSTALL_RECORD"
955 remind_ph="yes"
956 elif [ "$ans" = "2" ]; then
957 found="yes"
958 # external public_html
959 echo
960 public_html="/home/${logname}/public_html"
961 if [ "$logname" = "root" ]; then
962 public_html="/usr/local/apache/htdocs"
963 fi
964
965itext47="Enter directory that is also accessible from the web [${public_html}]"
966
967 echo "$itext47"
968 echo "$itext47" >> "${gsdlhome}/INSTALL_RECORD"
969 printf "%s" "> "
970 read ans
971 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
972 if [ "$ans" != "" ]; then
973 public_html="$ans"
974 fi
975
976itext48="
977Unable to write to $public_html directory. You will need
978to create a link called gsdl from $public_html to
979$gsdlhome after this installation is completed. You'll be
980reminded of this again at the end of the installation
981procedure."
982
983 # create link to gsdl (and update Uninstall.sh)
984 if [ -w "$public_html" ]; then
985 cd "$gsdlhome"
986 echo "#!/bin/sh" > Uninstall.sh
987 echo "" >> Uninstall.sh
988 echo "$cmd_rm \"$public_html/gsdl\"" >> Uninstall.sh
989 echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> Uninstall.sh
990 echo "$cmd_rm \"${cgi_bin}/library\"" >> Uninstall.sh
991 echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh
992 echo "read ans" >> Uninstall.sh
993 echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> Uninstall.sh
994 echo " $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh
995 echo "fi" >> Uninstall.sh
996 $cmd_chmod u+x Uninstall.sh
997 cd "$thisdir"
998
999 msg="--> Install.sh: [cd \"$public_html\"]"
1000 echo "$msg"
1001 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1002 cd "$public_html"
1003 msg="--> Install.sh: [$cmd_ln \"$gsdlhome\" gsdl]"
1004 echo "$msg"
1005 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1006 $cmd_ln "$gsdlhome" gsdl
1007 msg="--> Install.sh: [cd \"$thisdir\"]"
1008 echo "$msg"
1009 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1010 cd "$thisdir"
1011 else
1012 echo "$itext48"
1013 echo "$itext48" >> "${gsdlhome}/INSTALL_RECORD"
1014 old_ph=$public_html
1015 remind_ph_nolink="yes"
1016 fi
1017 public_html="${public_html}/gsdl"
1018 fi
1019done
1020
1021itext49="
1022Enter the web address of the $public_html directory.
1023This may be a relative url (e.g. \"/gsdl\") or a
1024complete url (e.g. \"http://${hostname}/gsdl\") [/gsdl]"
1025
1026itext50="
1027In order to use end-user collection building or to access certain
1028parts of the administration pages you must have a password.
1029A user with the username \"admin\" will be created for you with
1030the password you provide (i.e. to enter any pages requiring user
1031authentication enter the \"admin\" username and the password you
1032set here).
1033"
1034
1035itext51="
1036
1037Greenstone installation completed successfully."
1038
1039itext52=" * Don't forget to configure your webserver to treat
1040 $cgi_bin as a cgi executable directory."
1041
1042itext53=" For the Apache webserver this means adding the following
1043 ScriptAlias directive to your httpd.conf configuration file."
1044
1045itext54=" * Don't forget to move the contents of ${gsdlhome}/cgi-bin
1046 to $cgi_bin
1047"
1048
1049itext55=" * Don't forget to configure your webserver to treat
1050 $gsdlhome as a web accessible directory."
1051
1052itext56=" For the Apache webserver this means adding the following
1053 Alias directive to your httpd.conf configuration file."
1054
1055itext57=" * Don't forget to create a link called gsdl from $old_ph
1056 to ${gsdlhome}.
1057"
1058
1059itext58="The output of this script has been recorded for you at
1060${gsdlhome}/INSTALL_RECORD.
1061You may remove Greenstone from your system at any time by running
1062the ${gsdlhome}/Uninstall.sh script.
1063Access Greenstone by pointing a web browser at
1064${web_cgi}/library
1065"
1066
1067# get httpprefix
1068echo "$itext49"
1069echo "$itext49" >> "${gsdlhome}/INSTALL_RECORD"
1070printf "%s" ">"
1071httpprefix="/gsdl"
1072read ans
1073echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
1074if [ "$ans" != "" ]; then
1075 httpprefix="$ans"
1076fi
1077
1078# get initial password
1079echo "$itext50"
1080echo "$itext50" >> "${gsdlhome}/INSTALL_RECORD"
1081pw=`"${gsdlhome}/bin/${gsdlos}/getpw"`
1082tmp="[admin]
1083<comment>
1084<enabled>true
1085<groups>administrator,colbuilder
1086<password>${pw}
1087<username>admin
1088----------------------------------------------------------------------"
1089echo "$tmp" | ${gsdlhome}/bin/${gsdlos}/txt2db "${gsdlhome}/etc/users.db"
1090$cmd_chmod a+rw "${gsdlhome}/etc/users.db"
1091
1092# edit gsdlsite.cfg
1093cd "$cgi_bin"
1094sed "s|\(gsdlhome *\)[^ ]*|\1\"${gsdlhome}\"|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
1095sed "s|#*\(httpprefix *\)[^ ]*|\1${httpprefix}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
1096sed "s|\(httpimg *\)[^ ]*|\1${httpprefix}/images|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
1097
1098# success
1099echo "$itext51"
1100echo "$itext51" >> "${gsdlhome}/INSTALL_RECORD"
1101if [ "$remind_cgi" = "yes" ]; then
1102 echo "$itext52"
1103 echo "$itext52" >> "${gsdlhome}/INSTALL_RECORD"
1104
1105 apache_web_cgi=`echo "$web_cgi" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"`
1106 cgi_bin_slash=`echo "$cgi_bin" | sed "s|/*$|/|"`
1107 cgi_bin_noslash=`echo "$cgi_bin" | sed "s|/*$||"`
1108
1109 msg="$itext53
1110
1111 ScriptAlias ${apache_web_cgi} \"${cgi_bin_slash}\"
1112 <Directory \"${cgi_bin_noslash}\">
1113 AllowOverride None
1114 Options None
1115 Order allow,deny
1116 Allow from all
1117 </Directory>
1118"
1119 echo "$msg"
1120 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1121fi
1122if [ "$remind_cgi_nomove" = "yes" ]; then
1123 echo "$itext54"
1124 echo "$itext54" >> "${gsdlhome}/INSTALL_RECORD"
1125fi
1126if [ "$remind_ph" = "yes" ]; then
1127 echo "$itext55"
1128 echo "$itext55" >> "${gsdlhome}/INSTALL_RECORD"
1129
1130 apache_httpprefix=`echo "$httpprefix" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"`
1131 public_html_slash=`echo "$public_html" | sed "s|/*$|/|"`
1132 public_html_noslash=`echo "$public_html" | sed "s|/*$||"`
1133
1134 msg="$itext56
1135
1136 Alias ${apache_httpprefix} \"${public_html_slash}\"
1137 <Directory \"${public_html_noslash}\">
1138 Options Indexes MultiViews FollowSymLinks
1139 AllowOverride None
1140 Order allow,deny
1141 Allow from all
1142 </Directory>
1143"
1144 echo "$msg"
1145 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1146fi
1147if [ "$remind_ph_nolink" = "yes" ]; then
1148 echo "$itext57"
1149 echo "$itext57" >> "${gsdlhome}/INSTALL_RECORD"
1150fi
1151echo "$itext58"
1152echo "$itext58" >> "${gsdlhome}/INSTALL_RECORD"
1153
1154exit 0
Note: See TracBrowser for help on using the repository browser.