PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
SYNOPSIS_="$NAME_"
REQUIRES_="standard GNU commands, apt, dpkg"
- VERSION_="1.37"
- DATE_="2010-09-23; last update: 2014-10-14"
+ VERSION_="1.38"
+ DATE_="2010-09-23; last update: 2014-10-17"
AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
URL_="http://evergreen-ils.org"
CATEGORY_="devel"
echo "If you are using a customized maintenance page"
echo -e "then copy the custom" ${COL_BR_GREEN} index.html or index.php ${COL_RESET}
echo -e "file and any image files"${COL_BR_RED} .jpg or .png${COL_RESET}
-echo -e "to the" ${COL_YELLOW} "${CUSTOMDIR}" ${COL_RESET} directory
+echo -e "to the" ${COL_YELLOW} "${CUSTOMDIR}/maint_page" ${COL_RESET} directory
echo "before continuing."
sleep 0.1
echo
### Configure the maintenance page on LVS servers
mkdir -p "$OUTDIR/$LVS/var/www"
- if $(ls $CUSTOMDIR |grep -q "index.html")
+ if $(ls $CUSTOMDIR/maint_page |grep -q "index.html\|index.php")
then
- echo;echo "Using custom maintenance page..."
- MAINT_PAGE_INDEX="$CUSTOMDIR/index.html"
- CUSTOM_MAINT_PAGE_INDEX="y"
- elif $(ls $CUSTOMDIR |grep -q "index.php")
- then
- MAINT_PAGE_INDEX="$CUSTOMDIR/index.php"
- CUSTOM_MAINT_PAGE_INDEX="y"
- else
- MAINT_PAGE_INDEX="$TEMPLATEDIR/SIP/index.html"
+ echo;echo "Installing custom maintenance page on ${LVS}..."
+ CUSTOM_MAINT_PAGE_INDEX="y"
fi
- CUSTOM_MAINT_PAGE_INDEX="y" && cp -f $CUSTOMDIR/*.jpg $CUSTOMDIR/*.png "$OUTDIR/$LVS/var/www/" >/dev/null 2>&1
- cp -f $TEMPLATEDIR/SIP/index.html "$OUTDIR/$LVS/var/www"
+ if [ "$CUSTOM_MAINT_PAGE_INDEX" = "y" ]
+ then
+ cp -f $CUSTOMDIR/maint_page/* "$OUTDIR/$LVS/var/www/"
+ else
+ cp -f $TEMPLATEDIR/lvs/maint_page/* "$OUTDIR/$LVS/var/www"
+ fi
+
+
### configure apache2 ssl for maint. page.
mkdir -p "$OUTDIR/$LVS/etc/apache2/ssl" && cp -f "${CERT_DIR}/server.key" "$OUTDIR/$LVS/etc/apache2/ssl"
[ -e "${CERT_DIR}/ca.crt" ] && cp -f "${CERT_DIR}/ca.crt" "$OUTDIR/$LVS/etc/apache2/ssl"
cp -f $TEMPLATEDIR/SIP/sip.init "$OUTDIR/$SIPNODE/etc/init.d/oils_sip"
cp -f $TEMPLATEDIR/SIP/eg_sip_root.crontab "$OUTDIR/$SIPNODE/root/eg"
cp -f $TEMPLATEDIR/SIP/display_sip_connections.sh "$OUTDIR/$SIPNODE/root/eg"
- #if $(ls $CUSTOMDIR |grep -q "index.html") ### Moved to LVS
- #then
- #MAINT_PAGE_INDEX="$CUSTOMDIR/index.html"
- #CUSTOM_MAINT_PAGE_INDEX="y"
- # elif $(ls $CUSTOMDIR |grep -q "index.php")
- # then
- # MAINT_PAGE_INDEX="$CUSTOMDIR/index.php"
- # CUSTOM_MAINT_PAGE_INDEX="y"
- # else
- # MAINT_PAGE_INDEX="$TEMPLATEDIR/SIP/index.html"
- #fi
- #CUSTOM_MAINT_PAGE_INDEX="y" && cp -f $CUSTOMDIR/*.jpg $CUSTOMDIR/*.png "$OUTDIR/$SIPNODE/var/www/" >/dev/null 2>&1
- #cp -f $TEMPLATEDIR/SIP/index.html "$OUTDIR/$SIPNODE/var/www"
done
echo "Done setting up SIP."