From 34b1b8c95633a2a183be72401c388bee96784806 Mon Sep 17 00:00:00 2001 From: Jeff Volkenant Date: Thu, 18 Apr 2019 11:37:33 -0700 Subject: [PATCH] fix logging to writeable directory --- setup/solr.sh | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/setup/solr.sh b/setup/solr.sh index 377aaf97..b835bb9e 100644 --- a/setup/solr.sh +++ b/setup/solr.sh @@ -65,9 +65,46 @@ EOF # Reload systemctl to pickup the above override systemctl daemon-reload -# Restart services to reload solr schema & dovecot plugins +# Fix Logging +# Due to the new systemd security permissions placed when running jetty +# the log file directory at /var/log/jetty9 is reset to jetty:jetty +# at every program start. This causes syslog to fail to add the +# rsyslog filtered output to this folder. We will move this up a +# directory to /var/log/ since solr-jetty is quite noisy. + +# Remove package config file since it points to a folder that +# it does not have permissions to, and is also too far down the +# /etc/rsyslog.d/ order to work anyway +rm -f /etc/rsyslog.d/jetty9.conf + +# Create new rsyslog config for jetty9 for its new location +cat > /etc/rsyslog.d/10-jetty9.conf < /etc/logrotate.d/jetty9.conf <