From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 61CFF59CA5 for ; Fri, 25 Mar 2016 11:46:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5CFD421C04E; Fri, 25 Mar 2016 11:46:33 +0000 (UTC) Received: from acheron.yagibdah.de (acheron.yagibdah.de [185.55.75.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0C15FE085C for ; Fri, 25 Mar 2016 11:46:31 +0000 (UTC) Received: from heimdali.yagibdah.de ([192.168.3.20]) by acheron.yagibdah.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.85) (envelope-from ) id 1ajQCD-0007jG-49 for gentoo-user@lists.gentoo.org; Fri, 25 Mar 2016 12:46:29 +0100 Received: from lee by heimdali.yagibdah.de with local (Exim 4.85) (envelope-from ) id 1ajQCD-0002lr-2G for gentoo-user@lists.gentoo.org; Fri, 25 Mar 2016 12:46:29 +0100 From: lee To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] logrotate: name of log file after it's rotated? Date: Fri, 25 Mar 2016 12:46:21 +0100 Organization: my virtual residence Message-ID: <87wpoqlr02.fsf@heimdali.yagibdah.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Mail-Followup-To: gentoo-user@lists.gentoo.org Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain X-Archives-Salt: 4b9b9a36-1cd9-40b9-b88f-e931660e276a X-Archives-Hash: b21aaf652af57190df8460b527be5be3 Hi, is there a built-in way (like a place holder) to figure out what name a rotated log file has been given by logrotate? Here's what I'm trying to do: ,---- [ cat /etc/logrotate.d/exim } | /var/log/exim/exim*.log { | daily | missingok | rotate 800 | compress | delaycompress | notifempty | create 640 mail mail | postrotate | /usr/sbin/eximstats | mail -s "eximstats" root | endscript | } `---- I want replaced with the name the log file that has been rotated has been renamed to. I can think of ways to do this otherwise, like writing a script that figures out the name of the file, or using 'prerotate' instead. It just won't make any sense if logrotate doesn't already have some kind of place holder for this.