install-eg.sh: fix setup of non-prod Apache includes
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 8 Aug 2016 17:29:48 +0000 (10:29 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 8 Aug 2016 17:29:48 +0000 (10:29 -0700)
deployment/install-eg.sh

index a6fb4a3..b20ab8a 100755 (executable)
@@ -90,7 +90,10 @@ chown -R opensrf:opensrf /var/lock/apache2
 
 # More Apache stuff for non-production sites (we manage this with Puppet on prod)
 if [[ ! -n "$PROD" ]] ; then
-  SITECONFIGS="/etc/apache2/includes/498-ssl-star.catalogue.libraries.coop-include /etc/apache2/includes/499-rewrites.conf-include /etc/apache2/sites-available/eg.conf /etc/apache2/sites-available/499-star.catalogue.libraries.coop.conf"
+  if [ ! -d "/etc/apache2/includes" ] ; then
+    mkdir /etc/apache2/includes
+  fi
+  SITECONFIGS="/etc/apache2/includes/498-ssl-star.catalogue.libraries.coop-include /etc/apache2/includes/499-rewrites.conf-include /etc/apache2/includes/default.conf-include /etc/apache2/sites-available/eg.conf /etc/apache2/sites-available/499-star.catalogue.libraries.coop.conf"
   for SITECONFIG in ${SITECONFIGS} ; do
     mv ${SITECONFIG} ${SITECONFIG}.bak
     cp ${SITKACONF}/files/${SITECONFIG}/${HOSTNAME} ${SITECONFIG}