source: trunk/gsdl3/gs3-launch.sh.in@ 7833

Last change on this file since 7833 was 7758, checked in by kjdon, 20 years ago

removed the test for GSDL3HOME - now we always source gs3-setup.sh, otherwise we may have the wrong GSDL3HOME set

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 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## -------- gs3-setup.sh --------
11
12if [ ! -f gs3-setup.sh ]; then
13 echo "You must run this script from within the Greenstone 3 home directory"
14 exit 1
15fi
16
17#set up the environment
18source gs3-setup.sh
19
20
21#set up java options for catalina
22CATALINA_OPTS="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"
23export CATALINA_OPTS
24
25
26if [ "$1" != "-shutdown" ]; then
27
28 ## -------- Run MySQL --------
29
30 echo "Starting MySQL Daemon..."
31 echo ""
32 pushd $GSDL3HOME/packages/mysql
33 ./bin/mysqld_safe --datadir=$GSDL3HOME/packages/mysql/var --basedir=$GSDL3HOME/packages/mysql &
34 popd
35 echo "Done."
36 ## -------- Run Tomcat --------
37
38 echo "Starting Tomcat Webserver..."
39 echo ""
40 pushd $GSDL3HOME/comms/jakarta/tomcat/bin
41 ./startup.sh
42 popd
43 echo "Done. It will be ready in a few minutes."
44
45 ## -------- Greenstone 3 --------
46
47 echo ""
48 echo "****************************************************************"
49 echo "Greenstone collections will start being served in several"
50 echo "minutes. Use your browser to view the Greenstone collections by"
51 echo "choosing to:"
52 echo ""
53 echo " 'run the library servlet'"
54 echo ""
55 echo "from the page shown at:"
56 echo ""
57 echo " http://localhost:8080/gsdl3"
58 echo ""
59 echo "To cease serving greenstone collections please run this file"
60 echo "again but provide the shutdown argument like so:"
61 echo ""
62 echo " gs3-launch.sh -shutdown"
63 echo ""
64 echo "****************************************************************"
65 echo ""
66
67else
68
69 ## -------- Stop Tomcat --------
70
71 echo "Shutting Down Tomcat Webserver..."
72 echo ""
73 pushd $GSDL3HOME/comms/jakarta/tomcat/bin
74 ./shutdown.sh
75 popd
76 echo "Done."
77
78 ## -------- Stop MySQL --------
79
80 echo "Stop MySQL Daemon..."
81 echo ""
82 ./gs3-mysql-server.sh stop
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.