install-eg.sh: remote logging for prod
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Wed, 5 Sep 2018 20:19:14 +0000 (13:19 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Wed, 5 Sep 2018 20:19:14 +0000 (13:19 -0700)
deployment/install-eg.sh

index 5f4e1af..213806e 100755 (executable)
@@ -196,6 +196,17 @@ if [[ ! -n "$PROD" ]] ; then
   fi
 fi
 
+# remote logging (prod only)
+if [[ -n "$PROD" ]] ; then
+  apt-get install syslog-ng
+  cp ${SITKACONF}/files/etc/syslog-ng/syslog-ng.conf/${HOSTNAME} /etc/syslog-ng/syslog-ng.conf
+  cp ${SITKACONF}/files/etc/syslog-ng/conf.d/sitka.conf/${HOSTNAME} /etc/syslog-ng/conf.d/sitka.conf
+  systemctl restart syslog-ng.service
+  cp ${SITKACONF}/files/usr/local/bin/eg-stats-collector-remote-log.pl /usr/local/bin/eg-stats-collector-remote-log.pl
+  cp ${SITKACONF}/files/usr/local/bin/eg-stats-keepalive.sh /usr/local/bin/eg-stats-keepalive.sh
+  cp ${SITKACONF}/files/etc/cron.d/eg-stats-keepalive/${HOSTNAME} /etc/cron.d/eg-stats-keepalive
+fi
+
 # action trigger filters (prod only)
 if [[ -n "$PROD" ]] ; then
   if [ -f "${INSTALLDIR}/conf/action_trigger_filters.json" ] ; then