From 45076b05571da006f4b2500eb720a2e17a2a0bbd Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 25 Jun 2019 16:47:11 -0400 Subject: [PATCH] 2019-06-25 Fred Gleason * Added a sample syslog.conf(5) snippet in 'conf/syslog.conf-sample'. * Added a sample logrotate(5) snippet in 'conf/logrotate-sample'. --- ChangeLog | 3 +++ conf/Makefile.am | 4 +++- conf/logrotate-sample | 18 ++++++++++++++++++ conf/syslog.conf-sample | 16 ++++++++++++++++ rivendell.spec.in | 13 +++++++++++-- 5 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 conf/logrotate-sample create mode 100644 conf/syslog.conf-sample diff --git a/ChangeLog b/ChangeLog index 53cd12fe..b3c0e683 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18833,3 +18833,6 @@ 2019-06-25 Fred Gleason * Adjusted to priority of 'operations' system events to use LOG_INFO priority. +2019-06-25 Fred Gleason + * Added a sample syslog.conf(5) snippet in 'conf/syslog.conf-sample'. + * Added a sample logrotate(5) snippet in 'conf/logrotate-sample'. diff --git a/conf/Makefile.am b/conf/Makefile.am index 7932e1e6..0997b1b2 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -29,9 +29,11 @@ uninstall: rm -f $(DESTDIR)/etc/pam.d/rivendell EXTRA_DIST = asound.conf-sample\ + logrotate-sample\ rd-bin.conf.in\ rd.conf-sample\ - rivendell.pam + rivendell.pam\ + syslog.conf-sample CLEANFILES = *~ DISTCLEANFILES = rdfeed.conf diff --git a/conf/logrotate-sample b/conf/logrotate-sample new file mode 100644 index 00000000..5113fae3 --- /dev/null +++ b/conf/logrotate-sample @@ -0,0 +1,18 @@ +# +# This defines the rotation rules for the Rivendell syslogs. +# + +/var/log/rivendell/operations +/var/log/rivendell/debug +{ + missingok + daily + rotate 30 + maxage 30 + dateext + dateyesterday + sharedscripts + postrotate + /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true + endscript +} diff --git a/conf/syslog.conf-sample b/conf/syslog.conf-sample new file mode 100644 index 00000000..d5ca1bd4 --- /dev/null +++ b/conf/syslog.conf-sample @@ -0,0 +1,16 @@ +# +# This is the syslog configuration file for Rivendell. +# +# After making changes to this file, do: +# +# systemctl restart rsyslog +# +# to make them effective. +# + +LOCAL7.INFO /var/log/rivendell/operations + +# +# Uncomment this line to enable debugging messages +# +# LOCAL7.DEBUG /var/log/rivendell/debug diff --git a/rivendell.spec.in b/rivendell.spec.in index a690342a..5c1ac6db 100644 --- a/rivendell.spec.in +++ b/rivendell.spec.in @@ -28,7 +28,7 @@ Release: @RPM_RELEASE@ License: GPL Packager: Fred Gleason Source: rivendell-@VERSION@.tar.gz -Requires: @MYSQL_PKG@, @QT4_MYSQL_PKG@, @APACHE_PKG@, curl, @USERMODE_PKG@, @CDDA2WAV_PKG@, rivendell-pypad = @VERSION@ +Requires: @MYSQL_PKG@, @QT4_MYSQL_PKG@, @APACHE_PKG@, curl, @USERMODE_PKG@, @CDDA2WAV_PKG@, rivendell-pypad = @VERSION@, rsyslog BuildRoot: /var/tmp/rivendell-@VERSION@ Obsoletes: rivendell-base rivendell-opsguide Conflicts: rivendell-opsguide @@ -121,6 +121,8 @@ rm -f $RPM_BUILD_ROOT/@LOCAL_PREFIX@/@RD_LIB_PATH@/libqmysqlutf* mkdir $RPM_BUILD_ROOT/.qt touch $RPM_BUILD_ROOT/.qt/qt rm -rf $RPM_BUILD_ROOT/@libexecdir@/logos +mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d +cp conf/logrotate-sample $RPM_BUILD_ROOT/etc/logrotate.d/rivendell mkdir -p $RPM_BUILD_ROOT/@DOC_PATH@/logos cp icons/webget_logo.png $RPM_BUILD_ROOT/@DOC_PATH@/logos/ cp AUTHORS $RPM_BUILD_ROOT/@DOC_PATH@/ @@ -132,9 +134,10 @@ cp README $RPM_BUILD_ROOT/@DOC_PATH@/ cp UPGRADING $RPM_BUILD_ROOT/@DOC_PATH@/ cp CODINGSTYLE $RPM_BUILD_ROOT/@DOC_PATH@/ cp conf/*.conf $RPM_BUILD_ROOT/@DOC_PATH@/ -cp conf/rd.conf-sample $RPM_BUILD_ROOT/@DOC_PATH@/ +cat conf/rd.conf-sample | sed s/SyslogFacility=1/SyslogFacility=23/ > $RPM_BUILD_ROOT/@DOC_PATH@/rd.conf-sample cp conf/asound.conf-sample $RPM_BUILD_ROOT/@DOC_PATH@/ mkdir -p $RPM_BUILD_ROOT/@DOC_PATH@/misc +cp conf/syslog.conf-sample $RPM_BUILD_ROOT/@DOC_PATH@/ cp docs/misc/colors $RPM_BUILD_ROOT/@DOC_PATH@/misc/ cp docs/misc/reports.txt $RPM_BUILD_ROOT/@DOC_PATH@/misc/ cp docs/misc/ALSA.txt $RPM_BUILD_ROOT/@DOC_PATH@/misc/ @@ -203,6 +206,11 @@ fi if test ! -f @libexecdir@/logos/webget_logo.png ; then cp @DOC_PATH@/logos/webget_logo.png @libexecdir@/logos/webget_logo.png fi +mkdir -p /var/log/rivendell +if test ! -e /etc/rsyslog.d/rivendell.conf ; then + cp @DOC_PATH@/syslog.conf-sample /etc/rsyslog.d/rivendell.conf + /bin/systemctl restart rsyslog +fi exit 0 @@ -362,6 +370,7 @@ rm -rf $RPM_BUILD_ROOT @LOCAL_PREFIX@/share/desktop-directories/rivendell-rivendell.directory @LOCAL_PREFIX@/share/desktop-directories/rivendell-utilities.directory /etc/xdg/menus/applications-merged/rivendell-rivendell.menu +/etc/logrotate.d/rivendell /.qt/qt @libexecdir@/*.gif @libexecdir@/*.html