SYNOPSIS_="$NAME_"
REQUIRES_="standard GNU commands, apt, dpkg"
VERSION_="1.99"
- DATE_="2010-11-23; last update: 2019-04-09"
+ DATE_="2010-11-23; last update: 2019-07-11"
AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
URL_="http://evergreen-ils.org"
CATEGORY_="devel"
read -p "if you need to do any of the above." ENTER
+
Check_Test_Cluster () { ### Ask if this is a test cluster
echo;echo;echo;echo
TitleBar "Testing or Production"
fi
}
-Choose_Detected_Domain_Name () { ### Prompt to use detected domain name.
+Check_Install_From_Git () { ### Ask if we want to install master from git instead of the debs.
+echo;echo;echo;echo
+TitleBar "Inatallation Method"
+echo
+echo -e "Do you want to install Evergreen Version ${EG_VERSION} -OR-"
+echo -e "Install the cureent Evergreen Master from Git?"
echo
+while true; do
+ read -n 1 -p "Install master from git? [y/n] : " INSTALL_MASTER_FROM_GIT
+ case $INSTALL_MASTER_FROM_GIT in
+ [Yy]* ) echo ; echo Installing Evergreen Master from git...; sleep 2 ; break;;
+ [Nn]* ) echo ; echo Installing Evergreen ${EG_VERSION} ; sleep 2 ; break;;
+ * ) echo " Please answer yes or no.";;
+ esac
+done
+echo
+
+}
+
+Choose_Detected_Domain_Name () { ### Prompt to use detected domain name.
+echo;echo;echo;echo
#echo -e $COL_BR_BLUE"________Global Configuration________"$COL_RESET
TitleBar "Global Configuration"
echo
Check_Test_Cluster
fi
+### Check if we are installing Evergreen Master from git..
+if [ -z $INSTALL_MASTER_FROM_GIT ] || [ "$USE_CONFIG_FILE" == "0" ] ; then
+Check_Install_From_Git
+fi
+
### Prompt to use detected domain name.
if [ -z $CLUSTERDOMAINNAME ] || [ "$USE_CONFIG_FILE" == "0" ] ; then
Choose_Detected_Domain_Name
echo >> $NEW_CONFIG_FILE
Write_Config_File TEST_CLUSTER
+Write_Config_File INSTALL_MASTER_FROM_GIT
Write_Config_File ROBOTS_TXT
Write_Config_File CLUSTERDOMAINNAME
touch ../setup_${SUBFOLDER}/.osrf_node
sed -i "s^HOSTNAME^${SUBFOLDER}^g" ../setup_${SUBFOLDER}/debconf-settings
- cp -R $TEMPLATEDIR/debs ../setup_${SUBFOLDER}
+ [ "${INSTALL_MASTER_FROM_GIT}" = "n" ] && cp -R $TEMPLATEDIR/debs ../setup_${SUBFOLDER}
if [ -e "${SUBFOLDER}_drones.txt" ]
then
mv ${SUBFOLDER}_drones.txt ../setup_${SUBFOLDER}
cp "$TMPFOLDER/debconf-settings" "setup_${NODE_FOLDER}" && \
touch "setup_${NODE_FOLDER}/.osrf_node" && \
sed -i "s^HOSTNAME^${NODE_FOLDER}^g" "setup_${NODE_FOLDER}/debconf-settings" && \
-cp -R "$TEMPLATEDIR/debs" "setup_${NODE_FOLDER}"
+if [ "${INSTALL_MASTER_FROM_GIT}" = "n" ]
+then
+ cp -R "$TEMPLATEDIR/debs" "setup_${NODE_FOLDER}"
+fi
if echo ${NODE_FOLDER} | grep -q db0
then
cp -f "$TMPOSRFNODES" "setup_${NODE_FOLDER}/opensrf_nodes.txt"