From patchwork Thu Aug 22 21:45:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2370 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id CAD1A82DFF for ; Thu, 22 Aug 2019 22:45:39 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 46Dykq2rKtz5BXdG; Thu, 22 Aug 2019 22:45:39 +0100 (BST) Received: from michael.haj.ipfire.org (fw01.haj.ipfire.org [172.28.1.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 46Dykm1TYZz5BXdG; Thu, 22 Aug 2019 22:45:36 +0100 (BST) From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH] freeradius: Add a logrotate configuration file Date: Thu, 22 Aug 2019 21:45:29 +0000 Message-Id: <20190822214529.7008-1-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: Michael Tremer X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- 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)