PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
SYNOPSIS_="$NAME_"
REQUIRES_="standard GNU commands, apt, dpkg"
- VERSION_="1.90"
- DATE_="2010-11-23; last update: 2018-11-08"
+ VERSION_="1.91"
+ DATE_="2010-11-23; last update: 2018-11-20"
AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
URL_="http://evergreen-ils.org"
CATEGORY_="devel"
eval cp -f $TEMPLATEDIR/rsyslog/50-default.conf ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/rsyslog.d
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 cp -f $TEMPLATEDIR/monitor/check_osrf.sudoers ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/sudoers.d/nagios
#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 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/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 $TEMPLATEDIR/systemd/opensrf.sudoers ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/sudoers.d/opensrf
+ eval cp -f $TEMPLATEDIR/monitor/check_osrf.sudoers ${OUTDIR}/\$BRICKHOSTNAME${BRICK}/\$BRICKHOSTNAME${BRICK}-head/etc/sudoers.d/nagios
#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
cat $TEMPLATEDIR/opensrf.xml/opensrf.xml-footer >> "$OUTDIR/$OTHERNODE/openils/conf/opensrf.xml"
done
+### Add stuff to sudoers.d for opensrf nodes that are not bricks
### make sure user opensrf can restart apache when opensrf is restart on nodes that opensrf is installed
+### Also make sure user nagios can run check_osrf
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"
+ cp -f "${TEMPLATEDIR}/monitor/check_osrf.sudoers" "$OUTDIR/${OSRF_SUDO_NODE}/etc/sudoers.d/nagios"
done