Fixed shell scripts and added start and stop container scripts

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/distributions/smartgears-distribution-bundle@114129 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2015-04-16 10:37:11 +00:00
parent cbb86160ff
commit 6aedcfdafc
3 changed files with 17 additions and 5 deletions

View File

@ -1,17 +1,23 @@
PS1='$ '
TOMCAT_DST_FOLDER="tomcat"
TOMCAT_VERSION="${tomcat.version}"
TOMCAT_PID_FILENAME="pid.txt"
TOMCAT_PID_FILENAME="tomcat.pid"
SMARTGEAR_DISTRIBUTION_DIRECTORY="smartgears-distribution-${smartgear.version}"
SMARTGEAR_ROOT=${PWD}
GHN_HOME=${SMARTGEAR_ROOT}/${SMARTGEAR_DISTRIBUTION_DIRECTORY}
BUNDLE_HOME=${SMARTGEAR_ROOT}
STARTUP_SCRIPT="startContainer.sh"
STOP_SCRIPT="stopContainer.sh"
GHN_HOME=${SMARTGEAR_ROOT}/SmartGears
CONTAINER_FILENAME="container.xml"
CONTAINER_XML=${GHN_HOME}/${CONTAINER_FILENAME}
ENV_VARIABLES="export CATALINA_OPTS=\"-Xmx2000m -Xms2000m\"
export GHN_HOME=${GHN_HOME}
export CATALINA_PID=${SMARTGEAR_ROOT}/${TOMCAT_PID_FILENAME}
export CATALINA_HOME=${SMARTGEAR_ROOT}/${TOMCAT_DST_FOLDER}"
export CATALINA_HOME=${SMARTGEAR_ROOT}/${TOMCAT_DST_FOLDER}
export BUNDLE_HOME=${SMARTGEAR_ROOT}"
function showhelp {
@ -94,8 +100,8 @@ fi
echo "- Modify ${CONTAINER_XML} with your hostname"
echo "- Modify ${CONTAINER_XML} startup infrastructure and vres"
CATALINA_STARTUP_SCRIPT="${TOMCAT_DST_FOLDER}/bin/startup.sh"
echo "- Launch Tomcat from ${SMATGEAR_ROOT} using the command ${CATALINA_STARTUP_SCRIPT}"
echo "- You can Start the container from ${BUNDLE_HOME} directory using the command ./${STARTUP_SCRIPT}"
echo "- You can Stop the container from ${BUNDLE_HOME} directory using the command ./${STOP_SCRIPT}"
echo ""
echo "PLEASE NOTE:

View File

@ -0,0 +1,3 @@
#!/bin/bash
cd $BUNDLE_HOME
$CATALINA_HOME/bin/startup.sh

3
src/resources/stopContainer.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
cd $BUNDLE_HOME
$CATALINA_HOME/bin/shutdown.sh -force