-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrun_standalone_web.sh
executable file
·77 lines (67 loc) · 2.61 KB
/
run_standalone_web.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/sh
# Genoogle: Similar DNA Sequences Searching Engine and Tools. (http://genoogle.pih.bio.br)
# Copyright (C) 2008,2009 Felipe Fernandes Albrecht ([email protected])
#
# For further information check the LICENSE file.
#
# ----------------------------------------------------------------------------------------
# Script to start Genoogle with standalone web server which uses another Genoogle
# instance by wEBsERVICES
#
# Environment Variables:
#
# GENOOGLE_HOME Point at your Genoogle base directory.
#
# JAVA_HOME Must point at your Java Development Kit installation.
# Required to run the with the "debug" or "javac" argument.
#
# WEB_STANDALONE_PORT Port where the stand alone service will run.
#
# WEB_STANDALONE_APP_DIR Point where is Genoogle webservices web app directory.
#
# ----------------------------------------------------------------------------------------
if [ -n "${GENOOGLE_HOME+x}" ]; then
echo "\$GENOOGLE_HOME=$GENOOGLE_HOME"
else
echo "\$GENOOGLE_HOME is not set. Using `pwd`"
GENOOGLE_HOME=`pwd`
echo "\$GENOOGLE_HOME=$GENOOGLE_HOME"
fi
if [ -d ${GENOOGLE_HOME}/conf ]; then
echo "Configuration files is $GENOOGLE_HOME/conf/conf.xml"
else
echo "Configuration directory not found. Please configure correctly \$GENOOGLE_HOME."
return
fi
if [ -n "${WEB_STANDALONE_APP_DIR+x}" ]; then
echo "\$WEB_STANDALONE_APP_DIR=$WEB_STANDALONE_APP_DIR"
else
echo "\$WEB_STANDALONE_APP_DIR is not set. Trying ${GENOOGLE_HOME}/webapps/genoogle-standalone."
if [ -d ${GENOOGLE_HOME}/webapps/genoogle-standalone ]; then
WEB_STANDALONE_APP_DIR=${GENOOGLE_HOME}/webapps/genoogle-standalone
echo "Web Service App found at $WEB_STANDALONE_APP_DIR".
else
echo "Web Service App not found. Please configure it at WEB_STANDALONE_APP_DIR variable."
fi
fi
if [ -d ${WEB_STANDALONE_APP_DIR}/WEB-INF ]; then
echo "Web services Web application found at ${WEB_STANDALONE_APP_DIR}"
else
echo "${WEB_STANDALONE_APP_DIR} does not appears to be the Web Service App directory. Please, configure WEB_STANDALONE_APP_DIR variable correctly."
return;
fi
DEFAULT_PORT=8080
if [ -n "${WEB_STANDALONE_PORT+x}" ]; then
echo "\$WEB_STANDALONE_PORT=$WEB_STANDALONE_PORT"
else
echo "\$WEB_STANDALONE_PORT is not set. Using $DEFAULT_PORT."
WEB_STANDALONE_PORT=$DEFAULT_PORT
echo "\$WEB_STANDALONE_PORT=$WEB_STANDALONE_PORT"
fi
$JAVA_HOME/bin/java \
-Xms256m \
-Xmx512m \
-server \
-classpath ${GENOOGLE_HOME}/genoogle.jar:${GENOOGLE_HOME}/lib/*:${GENOOGLE_HOME}/lib/jetty/* \
bio.pih.genoogle.interfaces.WebServer \
${WEB_STANDALONE_APP_DIR} ${WEB_STANDALONE_PORT} true