PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
SYNOPSIS_="$NAME_"
REQUIRES_="standard GNU commands, apt, dpkg"
- VERSION_="1.25"
- DATE_="2010-09-23; last update: 2014-01-03"
+ VERSION_="1.26"
+ DATE_="2010-09-23; last update: 2014-01-13"
AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
URL_="http://evergreen-ils.org"
CATEGORY_="devel"
BoxTitleBar GenaSYS
echo
echo -en "$SHADE_BLUE_20 $SHADE_BLUE_20";echo
-echo -en "$SHADE_BLUE_20 Georgia PINES Evergreen $EG_VERSION Cluster configuration. $SHADE_BLUE_20";echo
+echo -en "$SHADE_BLUE_20 Evergreen $EG_VERSION Cluster configuration. $SHADE_BLUE_20";echo
echo -en "$SHADE_BLUE_20 $SHADE_BLUE_20";echo
-echo -en "$SHADE_BLUE_20 Welcome to GenaSYS for Evergreen $EG_VERSION $SHADE_BLUE_20";echo
+echo -en "$SHADE_BLUE_20 Welcome to GenaSYS for Evergreen ${EG_VERSION} ${SHADE_BLUE_20}";echo
echo -en "$SHADE_BLUE_20 This program will ask you a few questions then generate $SHADE_BLUE_20";echo
echo -en "$SHADE_BLUE_20 all the system config files needed for a standard $SHADE_BLUE_20";echo
echo -en "$SHADE_BLUE_20 distributed installation of Evergreen $EG_VERSION $SHADE_BLUE_20";echo
echo "Installation Notes:"
echo "==================="
echo
-echo -e $COL_YELLOW"Library IP based redirection:"$COL_RESET
+echo -e $COL_BR_RED'*** WARNING!! ***'$COL_RESET
+echo -e $COL_BR_CYAN
+echo "Please read the following installation notes or"
+echo "you're gonna be real messed up...."
+echo -e $COL_RESET
+read -p "Press [Enter] to continue" ENTER
+echo
+echo -e ${COL_BR_CYAN}"1 __Library IP based redirection:"$COL_RESET
echo "If you are going be using Library based redirection then"
echo -e "copy a preconfigured"$COL_BR_GREEN lib_ips.txt $COL_RESET
-echo -e "file to the" $COL_YELLOW "${CUSTOMDIR}" $COL_RESET folder
+echo -e "file to the" $COL_YELLOW "${CUSTOMDIR}" $COL_RESET directory
echo "before continuing."
sleep 0.1
echo
-echo -e $COL_YELLOW"Zip Codes for libraries:"$COL_RESET
+echo -e ${COL_BR_CYAN}"2 __Zip Codes for libraries:"$COL_RESET
echo "If you are using mutliple zip codes for libraries copy"
echo -e "a preconfigured" $COL_BR_GREEN zips.txt $COL_RESET
-echo -e "file to the" $COL_YELLOW "${CUSTOMDIR}" $COL_RESET folder
+echo -e "file to the" $COL_YELLOW "${CUSTOMDIR}" $COL_RESET directory
echo "before continuing."
sleep 0.1
echo
-echo -e $COL_YELLOW"Action Trigger Filters:"$COL_RESET
+echo -e ${COL_BR_CYAN}"3 __Action Trigger Filters:"$COL_RESET
echo "If you are using customized action trigger filters then copy"
echo -e "the custom" $COL_BR_GREEN action_trigger_filters.json $COL_RESET
-echo -e "file to the" $COL_YELLOW "${CUSTOMDIR}" $COL_RESET folder
+echo -e "file to the" $COL_YELLOW "${CUSTOMDIR}" $COL_RESET directory
echo "before continuing."
sleep 0.1
echo
-echo -e $COL_YELLOW"Custom Maintenance Page:"$COL_RESET
+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 folder
+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 "before continuing."
+sleep 0.1
+echo
+echo -e ${COL_BR_CYAN}"5 __Custom KPAC:"${COL_RESET}
+echo "If you are using a customized KPAC then copy your custom"
+echo -e ${COL_BR_GREEN}kpac.xml${COL_RESET} to the${COL_YELLOW} "${CUSTOMDIR}" ${COL_RESET} directory.
sleep 3
+echo
+echo -e "Press ${COL_BR_CYAN}[Enter]${COL_RESET} to continue or ${COL_BR_CYAN}[Ctrl-C]${COL_RESET} to quit now"
+read -p "if you need to do any of the above." ENTER
+
Choose_Detected_Domain_Name () { ### Prompt to use detected domain name.
echo;echo;echo;echo
cp -f $TEMPLATEDIR/setup_brick_to_drone_sshkeys.sh ../setup_${SUBFOLDER}/setup_${SUBFOLDER}_to_drone_sshkeys.sh
#cp -f $TEMPLATEDIR/db/eg_db_config.pl ../setup_${SUBFOLDER}
[ -e "${CUSTOMDIR}/lib_ips.txt" ] && cp "${CUSTOMDIR}/lib_ips.txt" ../setup_${SUBFOLDER}
+ [ -e "${CUSTOMDIR}/kpac.xml" ] && cp "${CUSTOMDIR}/kpac.xml" ../setup_${SUBFOLDER}
sed -i "s^brick_drones.txt^${SUBFOLDER}_drones.txt^g" ../setup_${SUBFOLDER}/setup_${SUBFOLDER}_to_drone_sshkeys.sh
sed -i "s^MASTER_DB^$MASTER_DB^g" setup-head.sh
sed -i "s^EG_DB_USER^$DB_USERNAME^g" setup-head.sh
### Setup custom lib_ips.txt file.
if [ -e lib_ips.txt ]
+then
echo
- echo "Enabling lib_ips.txt.."
- then
+ echo $COL_BR_CYAN"Enabling lib_ips.txt.."$COL_RESET
+ sleep 1
cp -f lib_ips.txt /openils/conf
chown opensrf:opensrf /openils/conf/lib_ips.txt
###TODO VERIFY THE BLOCK BELOW IS STILL NEEDED. some lines are deprecated.
sed -i 's^# #PerlSetVar OILSRedirectTpac "true"^ PerlSetVar OILSRedirectTpac "true"^g' /etc/apache2/eg_vhost.conf
fi
+### Setup custom KPAC
+if [ -e kpac.xml ]
+then
+ echo
+ echo -e $COL_BR_CYAN"Enabling Custom KPAC....."$COL_RESET
+ sleep 1
+ cp -f kpac.xml /openils/conf
+ chown opensrf:opensrf /openils/conf/kpac.xml
+ sed -i 's^kpac.xml.example^kpac.xml^g' /etc/apache2/eg_vhost.conf
+fi
+
### configure apache module for memcache01 IP
sed -i 's^# OSRFTranslatorCacheServer 127.0.0.1:11211^OSRFTranslatorCacheServer MEMCACHE01_IP:11211^g' /etc/apache2/eg_vhost.conf \
|| { echo;echo -e $COL_BR_RED"Warning: Failed to update OSRFTranslatorCacheServer to memcache ip in eg_vhost.conf"$COL_RESET ;sleep 1;echo ; }