diff --git a/etc/vagrant/bootstrap.sh b/etc/vagrant/bootstrap.sh index 9f33388d2ace0a41d7670180b1e93d41bcec334d..5546a892667fe8295581f524f4897d2073190eb9 100644 --- a/etc/vagrant/bootstrap.sh +++ b/etc/vagrant/bootstrap.sh @@ -85,7 +85,7 @@ GEOSERVER_VERSION=2.5 GEOSERVER_FILE=geoserver-$GEOSERVER_VERSION-war.zip GEOSERVER_SHELL_VERSION=0.2-SNAPSHOT GEOSERVER_SHELL_FILE=gs-shell-$GEOSERVER_SHELL_VERSION-app.zip -JAVA_VERSION=7u51 +JAVA_VERSION=7u55 #JAVA_VERSION=8 JAVA_FILE_32=jdk-$JAVA_VERSION-linux-i586.rpm JAVA_FILE_64=jdk-$JAVA_VERSION-linux-x64.rpm @@ -124,7 +124,7 @@ OSM2PGROUTING_VERSION=v2.0.0 OSM2PGROUTING_MAPPING_CONF=$DEPLOY_DIR/osm2pgrouting/mapconfig.xml OSMOSIS_VERSION=0.43.1 OSMOSIS_FILE=osmosis-$OSMOSIS_VERSION.zip -POSTGIS_VERSION=2.1.1 +POSTGIS_VERSION=2.1.2 POSTGRESQL_DATA_DIR=/var/lib/pgsql/9.3/data POSTGRESQL_HBA_CONF=$POSTGRESQL_DATA_DIR/pg_hba.conf POSTGRESQL_PKG_NAME=postgresql93 @@ -144,7 +144,7 @@ TABLE_PREFIX_ST=st_ TEMPLATE_VERSION_PSIPROBE=2.3.3 TEMPLATE_FILE_PSIPROBE=probe-$TEMPLATE_VERSION_PSIPROBE.zip TEMPLATE_DIR_ISOCHRONE=/vagrant -TOMCAT_VERSION=7.0.52 +TOMCAT_VERSION=7.0.53 TOMCAT_FILE=apache-tomcat-$TOMCAT_VERSION.tar.gz TOMCAT_NAME=tomcat TOMCAT_USER=tomcat @@ -205,6 +205,16 @@ WORKING_DIR=`pwd` ## Functions ############ +fn_download() +{ + FILE=$1 + URL=$2 + + if wget --no-check-certificate -O /dev/null -q $URL; then + wget --no-check-certificate -O $FILE -q $URL + fi +} + # "wget -N" does not work with "-O" option... so we use a workaround here fn_download_newer() { @@ -212,8 +222,8 @@ fn_download_newer() URL=$2 if [ ! -f "$FILE" ]; then - if wget -O /dev/null -q $URL; then - wget -q $URL -O $FILE + if wget --no-check-certificate -O /dev/null -q $URL; then + wget --no-check-certificate -O $FILE -q $URL fi fi } @@ -343,11 +353,11 @@ if $INSTALL_POSTGRES; then fi echo "Installing postgresql-9.3 repository" - fn_download_newer $DOWNLOAD_DIR/postgresql-repo.rpm $POSTGRESQL_REPO_RPM + fn_download $DOWNLOAD_DIR/postgresql-repo.rpm $POSTGRESQL_REPO_RPM yum -y localinstall $DOWNLOAD_DIR/postgresql-repo.rpm > install_postgresql_repo.log 2>&1 echo "Installing epel repository" - fn_download_newer $DOWNLOAD_DIR/epel-repo.rpm http://fedora.aau.at/epel/6/i386/epel-release-6-8.noarch.rpm + fn_download $DOWNLOAD_DIR/epel-repo.rpm http://fedora.aau.at/epel/6/i386/epel-release-6-8.noarch.rpm yum -y localinstall $DOWNLOAD_DIR/epel-repo.rpm > install_epel_repo.log 2>&1 fi @@ -364,7 +374,7 @@ fi if $INSTALL_POSTGRES; then echo "Installing $POSTGRESQL_PKG_NAME" - yum -y install $POSTGRESQL_PKG_NAME $POSTGRESQL_PKG_NAME-server $POSTGRESQL_PKG_NAME-contrib postgis2_93 > install_postgresql.log 2>&1 + yum -y install $POSTGRESQL_PKG_NAME $POSTGRESQL_PKG_NAME-server $POSTGRESQL_PKG_NAME-contrib > install_postgresql.log 2>&1 echo "export PostgreSQL_ROOT=/usr/pgsql-9.3" > /etc/profile.d/postgresql.sh source /etc/profile.d/postgresql.sh @@ -650,8 +660,10 @@ if $INSTALL_TOMCAT; then sed -i 's/password="admin"/password="$PG_DB_PASSWORD"/' $DEPLOY_DIR/$TOMCAT_NAME/conf/tomcat-users.xml echo "Configuring tomcat permissions" - chown -R $TOMCAT_USER:$TOMCAT_USER $TOMCAT_WEBAPP_DIR/geoserver - chown -R $TOMCAT_USER:$TOMCAT_USER $DEPLOY_DIR/geoserver + if $INSTALL_GEOSERVER; then + chown -R $TOMCAT_USER:$TOMCAT_USER $TOMCAT_WEBAPP_DIR/geoserver + chown -R $TOMCAT_USER:$TOMCAT_USER $DEPLOY_DIR/geoserver + fi echo "Configuring tomcat startup script" cp $SHARED_CONF_DIR/tomcat_startscript.sh /etc/init.d/$TOMCAT_NAME >> install_tomcat.log 2>&1