From: Andy Witter Date: Fri, 17 Oct 2014 14:45:25 +0000 (-0400) Subject: Fixed missing eg logo bug in maintenance page and reworked the maintenance page function. X-Git-Tag: GenaSYS-2.7.0~3 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8d3ad9557ac90e6ca67e8965181108c404741fa1;p=contrib%2Fpines%2Fgenasys.git Fixed missing eg logo bug in maintenance page and reworked the maintenance page function. --- diff --git a/GenaSYS.sh b/GenaSYS.sh index e8d8242..98ecb00 100755 --- a/GenaSYS.sh +++ b/GenaSYS.sh @@ -25,8 +25,8 @@ 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 " URL_="http://evergreen-ils.org" CATEGORY_="devel" @@ -262,7 +262,7 @@ echo -e ${COL_BR_CYAN}"4 __Custom Maintenance Page:"${COL_RESET} 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 @@ -1499,20 +1499,19 @@ for LVS in $MACHINES_LVS_ONLY ### 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" @@ -2435,19 +2434,6 @@ do 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." diff --git a/templates/lvs/maint_page/Evergreen_Logo_072.jpg b/templates/lvs/maint_page/Evergreen_Logo_072.jpg new file mode 100644 index 0000000..1ac7ced Binary files /dev/null and b/templates/lvs/maint_page/Evergreen_Logo_072.jpg differ diff --git a/templates/lvs/maint_page/index.html b/templates/lvs/maint_page/index.html new file mode 100644 index 0000000..2665d9d --- /dev/null +++ b/templates/lvs/maint_page/index.html @@ -0,0 +1,8 @@ + + +Evergreen Maintenance Page + + +
+

Evergreen is currently down for maintenance. We apologize for the inconvenience.

+