public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH] freeradius: Add a logrotate configuration file
Date: Thu, 22 Aug 2019 21:45:29 +0000	[thread overview]
Message-ID: <20190822214529.7008-1-michael.tremer@ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]

Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
---
 config/freeradius/logrotate | 11 +++++++++++
 lfs/freeradius              |  7 ++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 config/freeradius/logrotate

diff --git a/config/freeradius/logrotate b/config/freeradius/logrotate
new file mode 100644
index 000000000..ad8d43577
--- /dev/null
+++ b/config/freeradius/logrotate
@@ -0,0 +1,11 @@
+/var/log/radius/*.log /var/log/radius/radacct/*/* {
+    weekly
+    rotate 4
+    copytruncate
+    compress
+    notifempty
+    missingok
+    postrotate
+	/etc/init.d/freeradius reload &>/dev/null || true
+    endscript
+}
diff --git a/lfs/freeradius b/lfs/freeradius
index 21f6c0ad2..4afe55f18 100644
--- a/lfs/freeradius
+++ b/lfs/freeradius
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = freeradius
-PAK_VER    = 7
+PAK_VER    = 8
 
 DEPS       = "samba"
 
@@ -141,6 +141,11 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	install -v -m 644 $(DIR_SRC)/config/backup/includes/freeradius \
 		/var/ipfire/backup/addons/includes/freeradius
 
+	# Logrotate
+	-mkdir -pv /etc/logrotate.d
+	install -v -m 644 $(DIR_SRC)/config/freeradius/logrotate \
+		/etc/logrotate.d/freeradius
+
 	#install initscripts
 	$(call INSTALL_INITSCRIPT,freeradius)
 
-- 
2.20.1


                 reply	other threads:[~2019-08-22 21:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190822214529.7008-1-michael.tremer@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox