Update the way we modify oils_sip.xml to account for stock SIPconfig.xml
authorAndy Witter <awitter@georgialibraries.org>
Fri, 1 Sep 2017 13:27:42 +0000 (09:27 -0400)
committerAndy Witter <awitter@georgialibraries.org>
Fri, 1 Sep 2017 13:27:42 +0000 (09:27 -0400)
GenaSYS.sh

index deb15be..3655073 100755 (executable)
@@ -25,8 +25,8 @@
     PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
    SYNOPSIS_="$NAME_"
    REQUIRES_="standard GNU commands, apt, dpkg"
-    VERSION_="1.83"
-       DATE_="2010-11-23; last update: 2017-08-31"
+    VERSION_="1.84"
+       DATE_="2010-11-23; last update: 2017-09-01"
      AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
         URL_="http://evergreen-ils.org"
    CATEGORY_="devel"
@@ -2649,7 +2649,9 @@ echo "Setting up SIP.."
 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"
+       #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"
+       sed -i "/<server>/d" $SIP_XML
+       sed -i "/<cache>/a \\\t<server>$MEMCACHE01_IP:11211</server>\n\t<server>$MEMCACHE02_IP:11211</server>" "$SIP_XML"
 else 
        echo
        echo -e ${COL_RED} "WARNING!!" ${COL_RESET} ${COL_GREEN} "oils_sip.xml" ${COL_RESET} "was not found in ${CUSTOMDIR}"