source: trunk/gsdl3/gs3-launch.sh@ 6489

Last change on this file since 6489 was 6470, checked in by kjdon, 20 years ago

added -Xmx400M to CATALINA_OPTS to prevent a java out of memory error when running localsite and soapsite

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1#!/bin/sh
2
3echo
4echo "Greenstone 3 (GSDL3)"
5echo "Copyright (C) 2003 New Zealand Digital Libraries, University Of Waikato"
6echo "GSDL3 comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt"
7echo "This is free software, and you are welcome to redistribute it"
8echo
9
10## -------- setup.bash --------
11
12if [ ! -f gs3-setup.sh ]; then
13 echo "You must run this script from within the Greenstone home directory"
14 exit 1
15fi
16
17./gs3-setup.sh
18
19#set up java options for catalina
20CATALINA_OPTS="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"
21export CATALINA_OPTS
22
23
24if [ "$1" != "-shutdown" ]; then
25
26 ## -------- Run MySQL --------
27
28 echo "Starting MySQL Daemon..."
29 echo ""
30 pushd $GSDL3HOME/packages/mysql
31 ./bin/mysqld_safe &
32 popd
33 echo "Done."
34 ## -------- Run Tomcat --------
35
36 echo "Starting Tomcat Webserver..."
37 echo ""
38 pushd $GSDL3HOME/comms/jakarta/tomcat/bin
39 ./startup.sh
40 popd
41 echo "Done. It will be ready in a few minutes."
42
43 ## -------- Greenstone 3 --------
44
45 echo ""
46 echo "****************************************************************"
47 echo "Greenstone collections will start being served in several"
48 echo "minutes. Use your browser to view the Greenstone collections by"
49 echo "choosing to:"
50 echo ""
51 echo " 'run the library servlet'"
52 echo ""
53 echo "from the page shown at:"
54 echo ""
55 echo " http://localhost:8080/gsdl3"
56 echo ""
57 echo "To cease serving greenstone collections please run this file"
58 echo "again but provide the shutdown argument like so:"
59 echo ""
60 echo " gs3-launch.sh -shutdown"
61 echo ""
62 echo "****************************************************************"
63 echo ""
64
65else
66
67 ## -------- Stop Tomcat --------
68
69 echo "Shutting Down Tomcat Webserver..."
70 echo ""
71 pushd $GSDL3HOME/comms/jakarta/tomcat/bin
72 ./shutdown.sh
73 popd
74 echo "Done."
75
76 ## -------- Stop MySQL --------
77
78 echo "Stop MySQL Daemon..."
79 echo ""
80 pushd $GSDL3HOME/packages/mysql
81 ./bin/mysqladmin shutdown
82 popd
83 echo "Done."
84
85 ## -------- Greenstone 3 --------
86 echo "****************************************************************"
87 echo "Greenstone 3 has been shutdown. Run gs3-launch.sh to restart."
88 echo "****************************************************************"
89
90fi
91
92exit 0
93
94
95
Note: See TracBrowser for help on using the repository browser.