install-eg.sh: tweak for 3.1.4 prod
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 28 Aug 2018 21:34:43 +0000 (14:34 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 28 Aug 2018 21:34:43 +0000 (14:34 -0700)
deployment/install-eg.sh

index 5daf4e9..5f4e1af 100755 (executable)
@@ -210,12 +210,17 @@ OSRFCONFFILES="${INSTALLDIR}/conf/opensrf.xml ${INSTALLDIR}/conf/opensrf_core.xm
 for OSRFCONFFILE in ${OSRFCONFFILES}
 do
   mv ${OSRFCONFFILE} ${OSRFCONFFILE}.`date +%Y-%m-%d-%H%M%S`
-  cp ${SITKACONF}/files/${OSRFCONFFILE}/${HOSTNAME} ${OSRFCONFFILE}
+  if [[ -n "$PROD" && -f "${SITKACONF}/files/${OSRFCONFFILE}/${HOSTNAME}-314" ]] ; then
+    cp ${SITKACONF}/files/${OSRFCONFFILE}/${HOSTNAME}-314 ${OSRFCONFFILE}
+  else
+    cp ${SITKACONF}/files/${OSRFCONFFILE}/${HOSTNAME} ${OSRFCONFFILE}
+  fi
   sed -i "s|__HOSTNAME__|${THISHOST}|g" ${OSRFCONFFILE}
 done
 if [ ! -f "/home/opensrf/.srfsh.xml" ]
 then
   cp ${SITKACONF}/files/home/opensrf/.srfsh.xml/${HOSTNAME} /home/opensrf/.srfsh.xml
+  sed -i "s|__HOSTNAME__|${THISHOST}|g" /home/opensrf/.srfsh.xml
 fi 
 
 # 1. install dojo