install-eg.sh: SSL setup
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 8 Aug 2016 18:31:13 +0000 (11:31 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 8 Aug 2016 18:31:13 +0000 (11:31 -0700)
deployment/install-eg.sh

index b20ab8a..bca741e 100755 (executable)
@@ -80,11 +80,6 @@ do
   mv ${APACHEFILE} ${APACHEFILE}.`date +%Y-%m-%d-%H%M%S`
   cp ${SITKACONF}/files/${APACHEFILE}/${HOSTNAME} ${APACHEFILE}
 done
-#if [ ! -d "/etc/apache2/ssl" ]
-#then
-#  mkdir /etc/apache2/ssl
-#  cd /etc/apache2/ssl && openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key
-#fi
 # ensure opensrf can run Apache
 chown -R opensrf:opensrf /var/lock/apache2
 
@@ -99,6 +94,13 @@ if [[ ! -n "$PROD" ]] ; then
     cp ${SITKACONF}/files/${SITECONFIG}/${HOSTNAME} ${SITECONFIG}
     sed -i "s|__NONPROD__|${THISHOST}|g" ${SITECONFIG}
   done
+  if [ ! -d "/etc/apache2/ssl/libraries.coop/star.catalogue.libraries.coop" ]
+  then
+    mkdir -p /etc/apache2/ssl/libraries.coop/star.catalogue.libraries.coop
+    cp ${SITKACONF}/files/etc/ssl/apache2/star.catalogue.libraries.coop/star.catalogue.libraries.coop.crt /etc/apache2/ssl/libraries.coop/star.catalogue.libraries.coop/star_catalogue_libraries_coop.crt
+    cp ${SITKACONF}/files/etc/ssl/apache2/star.catalogue.libraries.coop/star.catalogue.libraries.coop.key /etc/apache2/ssl/libraries.coop/star.catalogue.libraries.coop/star_catalogue_libraries_coop.key
+    cp ${SITKACONF}/files/etc/ssl/apache2/star.catalogue.libraries.coop/star.catalogue.libraries.coop.ca /etc/apache2/ssl/libraries.coop/star.catalogue.libraries.coop/star_catalogue_libraries_coop.ca
+  fi
   a2ensite eg.conf
   a2ensite 499-star.catalogue.libraries.coop.conf
 fi