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"
[ -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
[ -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
### 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"
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