Project

General

Profile

« Previous | Next » 

Revision 8935

Added by Jing Tao about 10 years ago

Fixed a bug the code can get the argument from the command line.

View differences:

src/scripts/bash/install-java7-tomcat7.sh
38 38
   echo "This script should take one and only one parameter as the name of the host.";
39 39
   exit 1;
40 40
fi
41
HOST_NAMEW=$1
41
HOST_NAME=$1
42
echo "Host name is $HOST_NAME"
42 43

  
43 44
sudo /etc/init.d/apache2 stop
44 45
echo "install ${NEW_JDK_PACKAGE}"
......
148 149
done
149 150

  
150 151
echo "rename the site file knb to $HOST_NAME and knb-ssl to $HOST_NAME-ssl"
151
sudo mv $APACHE_AVAILABLE_SITES_DIR/$KNB $APACHE_AVAILABLE_SITES_DIR/$HOST_NAME.conf
152
sudo mv $APACHE_AVAILABLE_SITES_DIR/$KNB-ssl $APACHE_AVAILABLE_SITES_DIR/$HOST_NAME-ssl.conf
152
sudo mv $APACHE_AVAILABLE_SITES_DIR/$KNB.conf $APACHE_AVAILABLE_SITES_DIR/$HOST_NAME.conf
153
sudo mv $APACHE_AVAILABLE_SITES_DIR/$KNB-ssl.conf $APACHE_AVAILABLE_SITES_DIR/$HOST_NAME-ssl.conf
153 154

  
154 155
echo "enable the two sites $HOST_NAME and $HOST_NAME-ssl"
155 156
sudo a2ensite $HOST_NAME
......
158 159
sudo /etc/init.d/apache2 start
159 160
sudo /etc/init.d/tomcat7 start
160 161

  
161
exit 0
162
exit 0

Also available in: Unified diff