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

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

forgot to add a popd after the pushd

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1#!/bin/sh
2
3echo
4echo "Greenstone 3 (GSDL3)"
5echo "Copyright (C) 2004 New Zealand Digital Libraries, University Of Waikato"
6echo "Greenstone 3 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 echo "Starting MySQL Daemon..."
30 echo ""
31 pushd $GSDL3HOME/packages/mysql
32 ./bin/mysqld_safe --basedir=. --datadir=./data --err-log=./var/log/mysql.log --socket=/tmp/mysql.sock --user=root --pid_file=gsdl3.pid &
33 popd
34 echo "Done."
35
36 ## -------- Run Tomcat --------
37 echo "Starting Tomcat Webserver..."
38 echo ""
39 pushd $GSDL3HOME/comms/jakarta/tomcat/bin
40 ./startup.sh
41 popd
42 echo "Done. It will be ready in a minute."
43
44 ## -------- Greenstone 3 --------
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 echo "Shutting Down Tomcat Webserver..."
69 echo ""
70 pushd $GSDL3HOME/comms/jakarta/tomcat/bin
71 ./shutdown.sh
72 popd
73 echo "Done."
74
75 ## -------- Stop MySQL --------
76 echo "Stop MySQL Daemon..."
77 echo ""
78 pushd $GSDL3HOME/packages/mysql
79 ./bin/mysqladmin --user=root --socket=/tmp/mysql.sock shutdown
80 popd
81 #./gs3-mysql-server.sh stop
82 echo "Done."
83
84 ## -------- Greenstone 3 --------
85 echo "****************************************************************"
86 echo " Greenstone 3 has been shutdown. Run gs3-launch.sh to restart."
87 echo "****************************************************************"
88
89fi
90
91exit 0
92
93
94
Note: See TracBrowser for help on using the repository browser.