PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
SYNOPSIS_="$NAME_"
REQUIRES_="standard GNU commands, apt, dpkg"
- VERSION_="0.96"
- DATE_="2010-09-18; last update: 2012-11-16"
+ VERSION_="0.97"
+ DATE_="2010-09-18; last update: 2012-12-13"
AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
URL_="http://evergreen-ils.org"
CATEGORY_="devel"
OSRF_USERNAME="opensrf"
DB_USERNAME="evergreen"
#DRONECOUNT="2"
-TMPHOSTS="/tmp/tmphost.txt"
-TMPZONEFILE="/tmp/tmpzonefile.txt"
-TMPREVZONEFILE="/tmp/tmprevzonefile.txt"
-TMPOSRFNODES="/tmp/tmposrfnodes"
-TMPOPENSRF_XML="/tmp/tmpopensrf.xml"
+TMPFOLDER="/tmp/GenaSYS"
+TMPHOSTS="${TMPFOLDER}/tmphost.txt"
+TMPZONEFILE="${TMPFOLDER}/tmpzonefile.txt"
+TMPREVZONEFILE="${TMPFOLDER}/tmprevzonefile.txt"
+TMPOSRFNODES="${TMPFOLDER}/tmposrfnodes"
+TMPOPENSRF_XML="${TMPFOLDER}/tmpopensrf.xml"
PSQL_VERSION="9.1"
[ -z $CONFIG_FILE ] && CONFIG_FILE="$WD/genasys.conf"
NEW_CONFIG_FILE="$OUTDIR/genasys.conf"
CERT_DIR="${OUTDIR}/ssl_cert"
-
+if [ -e ${TMPFOLDER} ]
+then
+ rm -rf ${TMPFOLDER} || sudo rm -rf ${TMPFOLDER}
+ mkdir -p ${TMPFOLDER}
+else
+ mkdir -p ${TMPFOLDER}
+fi
#TMPBRICKDRONES="/tmp/tmpbricknodes"
cp "$TEMPLATEDIR/setup.sh" "setup_${NODE_FOLDER}/setup_$NODE_FOLDER.sh"
cp "$TEMPLATEDIR/setup-vars" "setup_${NODE_FOLDER}/setup-vars"
cp "$TEMPLATEDIR/setup-functions" "setup_${NODE_FOLDER}/setup-functions"
- if [ -e "$TEMPLATEDIR/apt/${NODE_FOLDER}_apt.list" ]
+ if [[ "$USE_HOSTNAME_PREFIX" = "y" || "$USE_HOSTNAME_PREFIX" = "Y" ]]
+ then
+ NODE_FOLDER_NO_PREFIX=$(echo $NODE_FOLDER|awk -F"-" '{ print $2 }')
+ else
+ NODE_FOLDER_NO_PREFIX=$NODE_FOLDER
+ fi
+ if [ -e "$TEMPLATEDIR/apt/${NODE_FOLDER_NO_PREFIX}_apt.list" ]
then
- cp "$TEMPLATEDIR/apt/${NODE_FOLDER}_apt.list" "setup_${NODE_FOLDER}"
+ cp "$TEMPLATEDIR/apt/${NODE_FOLDER_NO_PREFIX}_apt.list" "setup_${NODE_FOLDER}/${NODE_FOLDER}_apt.list"
else
cp "$TEMPLATEDIR/apt/apt.list" "setup_${NODE_FOLDER}/${NODE_FOLDER}_apt.list"
fi