Project

General

Profile

« Previous | Next » 

Revision 6558

remove reference to tomcat5.5 in favor of tomcat6. including the "custom" start up script that used the sun jdk -- this can be configured rather than coded into the script.

View differences:

postinst
2 2

  
3 3
LONG_DATE=`date +%Y%m%d%H%M%S`
4 4

  
5
TOMCAT_USER=tomcat55
6
TOMCAT_HOME=/usr/share/tomcat5.5
5
TOMCAT_USER=tomcat6
6
TOMCAT_HOME=/usr/share/tomcat6
7 7
SOURCE_DIR=/usr/share/metacat-@metacatVersion@
8 8

  
9 9
###############################################################################
......
12 12

  
13 13
## Stop tomcat
14 14
echo "Stopping Tomcat"
15
/etc/init.d/tomcat5.5 stop
15
/etc/init.d/tomcat6 stop
16 16

  
17 17
## backup the old war file
18 18
if [ -e ${TOMCAT_HOME}/webapps/knb.war ]
......
70 70
## Change ownership of the tomcat directories to be the tomcat user
71 71
echo "changing ownership of ${TOMCAT_HOME} to ${TOMCAT_USER}"
72 72
chown -R ${TOMCAT_USER} ${TOMCAT_HOME} 
73
echo "changing ownership of /var/lib/tomcat5.5 to ${TOMCAT_USER}"
74
chown -R ${TOMCAT_USER} /var/lib/tomcat5.5
75
echo "changing ownership of /etc/tomcat5.5 to ${TOMCAT_USER}"
76
chown -R ${TOMCAT_USER} /etc/tomcat5.5
73
echo "changing ownership of /var/lib/tomcat6 to ${TOMCAT_USER}"
74
chown -R ${TOMCAT_USER} /var/lib/tomcat6
75
echo "changing ownership of /etc/tomcat6 to ${TOMCAT_USER}"
76
chown -R ${TOMCAT_USER} /etc/tomcat6
77 77

  
78
## If the tomcat5.5 startup script in the package is different than the one
79
## in /etc/init.d, then backup the existing one and copy in the package version.
80
TOMCAT_START_SCRIPT_DIFF=`diff ${SOURCE_DIR}/tomcat5.5 /etc/init.d/tomcat5.5`
81
if [ "$TOMCAT_START_SCRIPT_DIFF" != "" ]
82
then
83
  echo "Backing up /etc/init.d/tomcat5.5 to /etc/init.d/tomcat5.5.${LONG_DATE}"
84
  mv /etc/init.d/tomcat5.5 /etc/init.d/tomcat5.5.${LONG_DATE}
85
  echo "Copying new tomcat5.5 script to /etc/init.d/"
86
  cp ${SOURCE_DIR}/tomcat5.5 /etc/init.d/
87
  echo "Making /etc/init.d/tomcat5.5 executable"
88
  chmod +x /etc/init.d/tomcat5.5
89
fi
90 78

  
91 79
###############################################################################
92 80
# Configure Apache
......
190 178
echo "starting Tomcat server"
191 179

  
192 180
#export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
193
#/usr/share/tomcat5.5/bin/startup.sh
181
#/usr/share/tomcat6/bin/startup.sh
194 182

  
195
/etc/init.d/tomcat5.5 start
183
/etc/init.d/tomcat6 start
196 184
#chmod u+x ${SOURCE_DIR}/delay-tomcat-start
197 185
#${SOURCE_DIR}/delay-tomcat-start &

Also available in: Unified diff