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

Last change on this file since 7305 was 6915, checked in by kjdon, 20 years ago

oops, last commit I left in an exit; that wasn't supposed to be there

  • 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#check that GSDL3HOME is set
18if test -z "$GSDL3HOME" ; then
19 source gs3-setup.sh
20fi
21
22#set up java options for catalina
23CATALINA_OPTS="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"
24export CATALINA_OPTS
25
26
27if [ "$1" != "-shutdown" ]; then
28
29 ## -------- Run MySQL --------
30
31 echo "Starting MySQL Daemon..."
32 echo ""
33 pushd $GSDL3HOME/packages/mysql
34 ./bin/mysqld_safe --datadir=$GSDL3HOME/packages/mysql/var --basedir=$GSDL3HOME/packages/mysql &
35 popd
36 echo "Done."
37 ## -------- Run Tomcat --------
38
39 echo "Starting Tomcat Webserver..."
40 echo ""
41 pushd $GSDL3HOME/comms/jakarta/tomcat/bin
42 ./startup.sh
43 popd
44 echo "Done. It will be ready in a few minutes."
45
46 ## -------- Greenstone 3 --------
47
48 echo ""
49 echo "****************************************************************"
50 echo "Greenstone collections will start being served in several"
51 echo "minutes. Use your browser to view the Greenstone collections by"
52 echo "choosing to:"
53 echo ""
54 echo " 'run the library servlet'"
55 echo ""
56 echo "from the page shown at:"
57 echo ""
58 echo " http://localhost:8080/gsdl3"
59 echo ""
60 echo "To cease serving greenstone collections please run this file"
61 echo "again but provide the shutdown argument like so:"
62 echo ""
63 echo " gs3-launch.sh -shutdown"
64 echo ""
65 echo "****************************************************************"
66 echo ""
67
68else
69
70 ## -------- Stop Tomcat --------
71
72 echo "Shutting Down Tomcat Webserver..."
73 echo ""
74 pushd $GSDL3HOME/comms/jakarta/tomcat/bin
75 ./shutdown.sh
76 popd
77 echo "Done."
78
79 ## -------- Stop MySQL --------
80
81 echo "Stop MySQL Daemon..."
82 echo ""
83 ./gs3-mysql-server.sh stop
84 echo "Done."
85
86 ## -------- Greenstone 3 --------
87 echo "****************************************************************"
88 echo "Greenstone 3 has been shutdown. Run gs3-launch.sh to restart."
89 echo "****************************************************************"
90
91fi
92
93exit 0
94
95
96
Note: See TracBrowser for help on using the repository browser.