Project

General

Profile

« Previous | Next » 

Revision 8265

Refer to metacat.war deployments since those are now the default. https://projects.ecoinformatics.org/ecoinfo/issues/6082

View differences:

postinst
15 15
/etc/init.d/tomcat6 stop
16 16

  
17 17
## backup the old war file
18
if [ -e ${TOMCAT_HOME}/webapps/knb.war ]
18
if [ -e ${TOMCAT_HOME}/webapps/metacat.war ]
19 19
then
20
  echo "Backing up ${TOMCAT_HOME}/webapps/knb.war to ${TOMCAT_HOME}/webapps/knb.war.${LONG_DATE}"
21
  mv ${TOMCAT_HOME}/webapps/knb.war ${TOMCAT_HOME}/webapps/knb.war.${LONG_DATE}
20
  echo "Backing up ${TOMCAT_HOME}/webapps/metacat.war to ${TOMCAT_HOME}/webapps/metacat.war.${LONG_DATE}"
21
  mv ${TOMCAT_HOME}/webapps/metacat.war ${TOMCAT_HOME}/webapps/metacat.war.${LONG_DATE}
22 22
fi  
23 23

  
24 24
## remove the knb application directory
25
if [ -d ${TOMCAT_HOME}/webapps/knb ]
25
if [ -d ${TOMCAT_HOME}/webapps/metacat ]
26 26
then
27 27
  echo "Removing the old metacat application directorties"
28
  rm -rf ${TOMCAT_HOME}/webapps/knb
28
  rm -rf ${TOMCAT_HOME}/webapps/metacat
29 29
fi 
30 30

  
31 31
## copy the new war file into the webapps directory
32
echo copying new knb.war file to ${TOMCAT_HOME}/webapps/knb.war
33
cp ${SOURCE_DIR}/knb.war ${TOMCAT_HOME}/webapps/knb.war
32
echo copying new metacat.war file to ${TOMCAT_HOME}/webapps/metacat.war
33
cp ${SOURCE_DIR}/metacat.war ${TOMCAT_HOME}/webapps/metacat.war
34 34

  
35 35
## expand the war file
36 36
CURR_DIR=`pwd`
37 37

  
38
## make knb directory and extract knb.war into it.
39
echo "Making knb application directory: ${TOMCAT_HOME}/webapps/knb"
40
mkdir ${TOMCAT_HOME}/webapps/knb
41
cd ${TOMCAT_HOME}/webapps/knb
38
## make knb directory and extract metacat.war into it.
39
echo "Making knb application directory: ${TOMCAT_HOME}/webapps/metacat"
40
mkdir ${TOMCAT_HOME}/webapps/metacat
41
cd ${TOMCAT_HOME}/webapps/metacat
42 42

  
43
echo "extracting knb.war into ${TOMCAT_HOME}/webapps/knb"
44
jar -xvf ${TOMCAT_HOME}/webapps/knb.war > /dev/null
45
chown -R ${TOMCAT_USER} ${TOMCAT_HOME}/webapps/knb
43
echo "extracting metacat.war into ${TOMCAT_HOME}/webapps/metacat"
44
jar -xvf ${TOMCAT_HOME}/webapps/metacat.war > /dev/null
45
chown -R ${TOMCAT_USER} ${TOMCAT_HOME}/webapps/metacat
46 46
echo cd to $CURR_DIR
47 47
cd $CURR_DIR
48 48

  
49
chmod -R  +x ${TOMCAT_HOME}/webapps/knb/cgi-bin
49
chmod -R  +x ${TOMCAT_HOME}/webapps/metacat/cgi-bin
50 50

  
51 51
###############################################################################
52 52
# Create Metacat External File Space
......
116 116
a2enmod jk
117 117

  
118 118
## copy in knb site file
119
if [ -e /etc/apache2/sites-available/knb ]
119
if [ -e /etc/apache2/sites-available/metacat ]
120 120
then 
121
  KNB_SITE_DIFF=`diff ${SOURCE_DIR}/knb /etc/apache2/sites-available/knb`
121
  KNB_SITE_DIFF=`diff ${SOURCE_DIR}/metacat /etc/apache2/sites-available/metacat`
122 122
  if [ "${KNB_SITE_DIFF}" != "" ]
123 123
  then
124
    echo "Backing up /etc/apache2/sites-available/knb to /etc/apache2/sites-available/knb.${LONG_DATE}"
125
    mv /etc/apache2/sites-available/knb /etc/apache2/sites-available/knb.${LONG_DATE}
124
    echo "Backing up /etc/apache2/sites-available/metacat to /etc/apache2/sites-available/metacat.${LONG_DATE}"
125
    mv /etc/apache2/sites-available/metacat /etc/apache2/sites-available/metacat.${LONG_DATE}
126 126
  fi
127 127
fi
128 128
echo "Copying knb site file to /etc/apache2/sites-available/"
129
cp ${SOURCE_DIR}/knb /etc/apache2/sites-available/
129
cp ${SOURCE_DIR}/metacat /etc/apache2/sites-available/
130 130

  
131 131
## enable knb site
132 132
echo "Enabling knb site"

Also available in: Unified diff