PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
SYNOPSIS_="$NAME_"
REQUIRES_="standard GNU commands, apt, dpkg"
- VERSION_="1.38"
- DATE_="2010-09-23; last update: 2014-10-17"
+ VERSION_="1.40"
+ DATE_="2010-09-23; last update: 2014-10-21"
AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
URL_="http://evergreen-ils.org"
CATEGORY_="devel"
done
}
-Get_Syndetics_Userid () { ### Prompt for Evergreen admin password.
+Get_Syndetics_Userid () { ### Prompt for Syndetics user id.
echo
read -p "Enter your Syndetics user id: " SYNDETICS_USER_ID
while [ "$SYNDETICS_USER_ID" = "" ]
echo
}
+
+Get_Use_Novelist () { ### Choose Syndetics for added content.
+while true; do
+ echo;echo;echo;echo
+ #echo -e $COL_BR_BLUE"____________________Added Content____________________"$COL_RESET
+ TitleBar "Novelist"
+ echo
+ read -n 1 -p "Do you want to use Novelist in this configuration [y/n]: " USE_NOVELIST
+ case $USE_NOVELIST in
+ [Yy]* ) echo ; break;;
+ [Nn]* ) echo ; break;;
+ * ) echo " Please answer yes or no.";;
+ esac
+done
+}
+
+Get_Novelist_Profile () { ### Prompt for Novelist profile.
+echo
+TitleBar "Novelist Profile"
+read -p "Enter your Novelist profile: " NOVELIST_PROFILE
+while [ "$NOVELIST_PROFILE" = "" ]
+ do
+ echo
+ echo -e $COL_BR_RED"Cannot be blank you must enter a Novelist profile"$COL_RESET
+ read -p "Enter your Novelist profile: " NOVELIST_PROFILE
+done
+echo
+}
+
+Get_Novelist_Password () { ### Prompt for Novelist password.
+echo
+TitleBar "Novelist Password"
+read -sp "Enter your password for your Novelist profile: " NOVELIST_PASSWORD
+while [ "$NOVELIST_PASSWORD" = "" ]
+ do
+ echo
+ echo -e $COL_BR_RED"Cannot be blank you must enter a Novelist password"$COL_RESET
+ read -sp "Enter your Novelist password: " NOVELIST_PASSWORD
+done
+echo
+read -sp "Confirm your password for your Novelist profile: " NOVELIST_PASSWORD_CONFIRM
+while [ "$NOVELIST_PASSWORD_CONFIRM" = "" ]
+ do
+ echo
+ echo -e $COL_BR_RED"Cannot be blank you must enter a Novelist password"$COL_RESET
+ read -sp "Enter your Novelist password: " NOVELIST_PASSWORD_CONFIRM
+done
+echo
+}
+
Get_Monitor_Admin_Username () {
echo
TitleBar "System Monitoring"
fi
Write_Config_File SYNDETICS_USER_ID
+if [ -z $USE_NOVELIST ] || [ "$USE_NOVELIST" == "0" ]
+then
+ Get_Use_Novelist
+fi
+Write_Config_File USE_NOVELIST
+
+if [[ "$USE_NOVELIST" == "y" || "$USE_NOVELIST" == "Y" ]]
+then
+ if [ -z "$NOVELIST_PROFILE" ] || [ "$NOVELIST_PROFILE" == "0" ]
+ then
+ Get_Novelist_Profile
+ fi
+fi
+Write_Config_File NOVELIST_PROFILE
+
+if [[ "$USE_NOVELIST" == "y" || "$USE_NOVELIST" == "Y" ]]
+then
+ if [ -z "$NOVELIST_PASSWORD" ] || [ "$NOVELIST_PASSWORD" == "0" ]
+ then
+ Get_Novelist_Password
+ Confirm_Password '$NOVELIST_PASSWORD' '$NOVELIST_PASSWORD_CONFIRM' Get_Novelist_Password
+ fi
+fi
+Write_Config_File NOVELIST_PASSWORD
+
#if [ "$MONITOR_ADMIN_USERNAME" = "" ] || [ "$MONITOR_ADMIN_USERNAME" = "0" ]
#then
# Get_Monitor_Admin_Username
sed -i "s^EG_ADMIN_USER^$EG_ADMIN_USER^g" setup-head.sh
sed -i "s^EG_ADMIN_PASS^$(echo $EG_ADMIN_PASSWORD | sed -e 's^&^\\\&^g' -e 's/\^/\\\^/g')^g" setup-head.sh
sed -i "s^MEMCACHE01_IP^$MEMCACHE01_IP^g" setup-head.sh
+ if [[ "$USE_NOVELIST" == "y" || "$USE_NOVELIST" == "Y" ]]
+ then
+ echo "NOVELIST_PROFILE=${NOVELIST_PROFILE}" > ../setup_${SUBFOLDER}/.Novelist.txt
+ echo "NOVELIST_PASSWORD=${NOVELIST_PASSWORD}" >> ../setup_${SUBFOLDER}/.Novelist.txt
+ chmod 600 ../setup_${SUBFOLDER}/.Novelist.txt
fi
+ fi
+
#TODO check drone pkging.
- cp $TEMPLATEDIR/Net-Z3950-SimpleServer-1.12.tar.gz ../setup_${SUBFOLDER}
- mv setup*.sh ../setup_${SUBFOLDER}/setup_${SUBFOLDER}.sh
- mv setup-vars ../setup_${SUBFOLDER}/
- mv "setup-functions" ../setup_${SUBFOLDER}/
- tar zcf ../setup_${SUBFOLDER}/${SUBFOLDER}.tar.gz *
- tar zcf ../setup_${SUBFOLDER}/${SUBFOLDER}_etc-hosts.tar.gz etc/hosts
- cd ..
- tar zcf setup_${SUBFOLDER}.tar.gz setup_${SUBFOLDER}
- rm -rf setup_${SUBFOLDER}
+ cp $TEMPLATEDIR/Net-Z3950-SimpleServer-1.12.tar.gz ../setup_${SUBFOLDER}
+ mv setup*.sh ../setup_${SUBFOLDER}/setup_${SUBFOLDER}.sh
+ mv setup-vars ../setup_${SUBFOLDER}/
+ mv "setup-functions" ../setup_${SUBFOLDER}/
+ tar zcf ../setup_${SUBFOLDER}/${SUBFOLDER}.tar.gz *
+ tar zcf ../setup_${SUBFOLDER}/${SUBFOLDER}_etc-hosts.tar.gz etc/hosts
+ cd ..
+ tar zcf setup_${SUBFOLDER}.tar.gz setup_${SUBFOLDER}
+ rm -rf setup_${SUBFOLDER}
done
cd ..
done