PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
SYNOPSIS_="$NAME_"
REQUIRES_="standard GNU commands, apt, dpkg"
- VERSION_="1.88"
- DATE_="2010-11-23; last update: 2018-11-07"
+ VERSION_="1.90"
+ DATE_="2010-11-23; last update: 2018-11-08"
AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
URL_="http://evergreen-ils.org"
CATEGORY_="devel"
WD=$(dirname $(readlink -f $0))
CUSTOMDIR="$WD/custom"
-EG_VERSION="3.0.2"
-UBUNTU_CODENAME="trusty"
+EG_VERSION="3.2.0"
+UBUNTU_CODENAME="xenial"
LICENSE="$WD/License.txt"
TEMPLATEDIR="$WD/templates"
DEFAULT_PRIVATE_NET="10.0.1"
BoxTitleBar GenaSYS
echo
echo -en "$SHADE_BLUE_20 $SHADE_BLUE_20";echo
-echo -en "$SHADE_BLUE_20 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 -en "$SHADE_BLUE_20 distributed installation of Evergreen $EG_VERSION $SHADE_BLUE_20";echo
echo -en "$SHADE_BLUE_20 $SHADE_BLUE_20";echo
for SHADE in {1..61}
do
eval mkdir -p ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/openils/var/data/locale/opac
eval mkdir -p ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/openils/var/web/reporter
eval mkdir -p ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/systemd/system
+ eval mkdir -p ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/sudoers.d
### head gets exports
if [ "$ROBOTS_TXT" = "y" ] || [ "$ROBOTS_TXT" = "Y" ] ### Copy robots.txt if selected.
eval cp -f $TEMPLATEDIR/apt/head_apt.list ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/\$BRICKHOSTNAME${BRICK}-head_apt.list
eval cp -f $TMPFOLDER/60-evergreen-ils.conf ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/rsyslog.d
eval cp -f $TEMPLATEDIR/rsyslog/50-default.conf ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/rsyslog.d
- eval cp -f $TEMPLATEDIR/autogen.service ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/systemd/system
+ eval cp -f $TEMPLATEDIR/systemd/autogen.service ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/systemd/system
+ eval cp -f $TEMPLATEDIR/systemd/opensrf.sudoers ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/sudoers.d/opensrf
#eval sed -i "s^CLUSTER_DOMAINNAME^${CLUSTERDOMAINNAME}^g" ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/60-evergreen-ils.conf
eval echo "\$BRICKHOSTNAME${BRICK}-head" > ${OUTDIR}/$(eval echo \$BRICKHOSTNAME${BRICK})/$(eval echo \$BRICKHOSTNAME${BRICK})-head/etc/hostname
eval mkdir -p ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/openils/var/data/locale/opac
eval mkdir -p ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/openils/var/web/reporter
eval mkdir -p ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/systemd/system
+ eval mkdir -p ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/sudoers.d
### head gets exports
if [ "$ROBOTS_TXT" = "y" ] || [ "$ROBOTS_TXT" = "Y" ] ### Copy robots.txt if selected.
then
eval cp -f $TEMPLATEDIR/apt/head_apt.list ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/\$BRICKHOSTNAME${BRICK}-head_apt.list
eval cp -f $TMPFOLDER/60-evergreen-ils.conf ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/rsyslog.d
eval cp -f $TEMPLATEDIR/rsyslog/50-default.conf ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/rsyslog.d
- eval cp -f $TEMPLATEDIR/autogen.service ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/systemd/system
+ eval cp -f $TEMPLATEDIR/systemd/autogen.service ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/systemd/system
+ eval cp -f $TEMPLATEDIR/systemd/opensrf.sudoers ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/sudoers.d
#eval cp -f /tmp/rsyslog.conf ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/
eval echo "\$BRICKHOSTNAME${BRICK}-head" > ${OUTDIR}/$(eval echo \$BRICKHOSTNAME${BRICK})/$(eval echo \$BRICKHOSTNAME${BRICK})-head/etc/hostname
eval echo "\$BRICKHOSTNAME${BRICK}-head" >> $TMPOSRFNODES
for UTILITY in $MACHINES_UTILITY; do
mkdir -p "$OUTDIR/$UTILITY/etc/systemd/system"
-cp -f "$TEMPLATEDIR/autogen.service" "$OUTDIR/$UTILITY/etc/systemd/system"
+cp -f "$TEMPLATEDIR/systemd/autogen.service" "$OUTDIR/$UTILITY/etc/systemd/system"
cp -f "$TMPFOLDER/exports" "$OUTDIR/$UTILITY/etc/"
### action trigger filters for utility.
mkdir -p "$OUTDIR/$OTHERNODE/openils/var/data/offline/blocked"
mkdir -p "$OUTDIR/$OTHERNODE/openils/var/data/vandelay"
mkdir -p "$OUTDIR/$OTHERNODE/openils/var/web/reporter"
+
mkdir -p "$OUTDIR/$OTHERNODE/etc/apache2/ssl" && cp -f "${CERT_DIR}/server.key" "$OUTDIR/$OTHERNODE/etc/apache2/ssl"
cp -f "${CERT_DIR}/server.crt" "$OUTDIR/$OTHERNODE/etc/apache2/ssl"
[ -e "${CERT_DIR}/ca.crt" ] && cp -f "${CERT_DIR}/ca.crt" "$OUTDIR/$OTHERNODE/etc/apache2/ssl"
cat $TEMPLATEDIR/opensrf.xml/opensrf.xml-footer >> "$OUTDIR/$OTHERNODE/openils/conf/opensrf.xml"
done
+### make sure user opensrf can restart apache when opensrf is restart on nodes that opensrf is installed
+for OSRF_SUDO_NODE in $MACHINES_OSRF_NO_BRICKS
+do
+ mkdir -p "$OUTDIR/$OSRF_SUDO_NODE/etc/sudoers.d"
+ cp -f "${TEMPLATEDIR}/systemd/opensrf.sudoers" "$OUTDIR/${OSRF_SUDO_NODE}/etc/sudoers.d/opensrf"
+done
+
### Setup SIP
echo