fix bug where we were not detecting .po files - Add memecache servers to custom oils_...
authorAndy Witter <awitter@georgialibraries.org>
Thu, 31 Aug 2017 02:08:48 +0000 (22:08 -0400)
committerAndy Witter <awitter@georgialibraries.org>
Thu, 31 Aug 2017 02:08:48 +0000 (22:08 -0400)
GenaSYS.sh

index c9c2cab..0534148 100755 (executable)
@@ -25,7 +25,7 @@
     PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
    SYNOPSIS_="$NAME_"
    REQUIRES_="standard GNU commands, apt, dpkg"
-    VERSION_="1.81"
+    VERSION_="1.82"
        DATE_="2010-11-23; last update: 2017-08-30"
      AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
         URL_="http://evergreen-ils.org"
@@ -1921,7 +1921,7 @@ for BRICK in $(seq $BRICKCOUNT)
        [ -e "${CERT_DIR}/ca.crt" ] && eval cp -f "${CERT_DIR}/ca.crt" ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/apache2/ssl
        [ -e "${CERT_DIR}/dhparams.pem" ] && eval cp -f "${CERT_DIR}/dhparams.pem" ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/apache2/ssl
        [ -e "${CUSTOMDIR}/zips.txt" ] && eval cp -f "${CUSTOMDIR}/zips.txt"  ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/openils/var/data/zips.txt
-       ls "${CUSTOMDIR}/*.po" >/dev/null && eval cp -f "${CUSTOMDIR}/*.po" ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/openils/var/data/locale/opac
+       eval ls "${CUSTOMDIR}/*.po" >/dev/null && eval cp -f "${CUSTOMDIR}/*.po" ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/openils/var/data/locale/opac
         eval cp -f $TEMPLATEDIR/opensrf_core.xml ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/openils/conf
        eval sed -i "s^UTILITY01_IP^$UTILITY01_IP^g" ${OUTDIR}/$(eval echo \$BRICKHOSTNAME${BRICK})/$(eval echo \$BRICKHOSTNAME${BRICK})-head/etc/eg_fstab_head
        eval sed -i "s^UTILITY02_IP^$UTILITY02_IP^g" ${OUTDIR}/$(eval echo \$BRICKHOSTNAME${BRICK})/$(eval echo \$BRICKHOSTNAME${BRICK})-head/etc/eg_fstab_head
@@ -2083,7 +2083,7 @@ for BRICK in $(seq $BRICKCOUNT)
        [ -e "${CERT_DIR}/ca.crt" ] && eval cp -f "${CERT_DIR}/ca.crt" ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/apache2/ssl
        [ -e "${CERT_DIR}/dhparams.pem" ] && eval cp -f "${CERT_DIR}/dhparams.pem" ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/apache2/ssl
        [ -e "${CUSTOMDIR}/zips.txt" ] && eval cp -f "${CUSTOMDIR}/zips.txt"  ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/openils/var/data/zips.txt
-       ls "${CUSTOMDIR}/*.po" >/dev/null && eval cp -f "${CUSTOMDIR}/*.po" ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/openils/var/data/locale/opac
+       eval ls "${CUSTOMDIR}/*.po" >/dev/null && eval cp -f "${CUSTOMDIR}/*.po" ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/openils/var/data/locale/opac
        eval sed -i "s^UTILITY01_IP^$UTILITY01_IP^g" ${OUTDIR}/$(eval echo \$BRICKHOSTNAME${BRICK})/$(eval echo \$BRICKHOSTNAME${BRICK})-head/etc/eg_fstab_head
        eval sed -i "s^UTILITY02_IP^$UTILITY02_IP^g" ${OUTDIR}/$(eval echo \$BRICKHOSTNAME${BRICK})/$(eval echo \$BRICKHOSTNAME${BRICK})-head/etc/eg_fstab_head
        eval sed -i "s^UTILITY03_IP^$UTILITY03_IP^g" ${OUTDIR}/$(eval echo \$BRICKHOSTNAME${BRICK})/$(eval echo \$BRICKHOSTNAME${BRICK})-head/etc/eg_fstab_head
@@ -2646,7 +2646,15 @@ done
 ### Setup SIP
 echo
 echo "Setting up SIP.."
-#for SIPNODE in sip01 sip02
+if [ -e "${CUSTOMDIR}/oils_sip.xml" ] 
+then
+       cp -f "${CUSTOMDIR}/oils_sip.xml" "${TMPFOLDER}"
+       sed -i "/<\/listeners>/a \\\t<\!-- One or more Memecache servers are required for Mulitplex mode. -->\n\t<\!-- Cache server(s) are ignored in non-Multiplex mode -->\n\t<cache>\n\t\  \<server>$MEMCACHE01_IP:11211</server>\n\t\  \<server>$MEMCACHE02_IP:11211</server>\n\t</cache>" "${TMPFOLDER}/oils_sip.xml"
+else 
+       echo
+       echo -e ${COL_RED} "WARNING!!" ${COL_RESET} ${COL_GREEN} "oils_sip.xml" ${COL_RESET} "was not found in ${CUSTOMDIR}"
+       sleep 5
+fi
 for SIPNODE in $MACHINES_SIP_ONLY
 do
        mkdir -p "$OUTDIR/$SIPNODE/opt"
@@ -3207,7 +3215,7 @@ if echo ${NODE_FOLDER} | grep -q sip0
 then
        cp -f "$TEMPLATEDIR/Net-Z3950-SimpleServer-1.12.tar.gz" "setup_${NODE_FOLDER}"
        cp -rf "$TEMPLATEDIR/apache2/websockets" "setup_${NODE_FOLDER}"
-       [ -e "${CUSTOMDIR}/oils_sip.xml" ] && cp -f "${CUSTOMDIR}/oils_sip.xml" "setup_${NODE_FOLDER}"
+       [ -e "${TMPFOLDER}/oils_sip.xml" ] && cp -f "${TMPFOLDER}/oils_sip.xml" "setup_${NODE_FOLDER}"
 fi
 if echo ${NODE_FOLDER} | grep -q reporter0
 then