LR_VENDOR_CRON.IN(1)

πŸ“¦ version 2.1.1, in arch rolling

πŸ’… LR_VENDOR_CRON.IN(1) β€” like, the manual page, bestie πŸŽ€

okay so this is lr_vendor_cron.in(1), straight out of LogReport's Lire Documentation β€” yes the whole thing, we're doing this πŸ’–


✨ NAME ✨

lr_vendor_cron β€” it generates Lire reports from, like, every log file it can find on your system πŸ¦‹ no cap.


🌸 SYNOPSIS 🌸

lr_vendor_cron daily|weekly|monthly

three moods. pick one. periodt.


🧚 DESCRIPTION 🧚

so lr_vendor_cron is literally designed to be invoked by cron. that's its whole main character energy πŸ‘‘

on systems that support /etc/cron.d/, you can summon it by creating /etc/cron.d/lire, and that file should read, like, exactly this:

02 5 * * * root /usr/sbin/lr_vendor_cron daily
22 5 * * 0 root /usr/sbin/lr_vendor_cron weekly
42 5 1 * * root /usr/sbin/lr_vendor_cron monthly

iconic. slay. 🫢

here's the vibe: lr_vendor_cron reads the files /etc/sysconfig/lire.d/*.cfg and /etc/default/lire.d/*.cfg. for each log file, one of these files should exist (like, one cfg per logfile, matching set, no strays πŸ’…). and the files should set these shell variables:

  • daemon β€” the name of a binary that generated the specific log. it's used to test whether the *.cfg-file is actually suitable for the current system. and if you wanna generate a log for something where no daemon is present on the current system? just use a placeholder like daemon=/bin/true. problem solved, bestie ✨
  • service β€” a Lire service, e.g. sendmail,
  • logfile β€” e.g. /var/log/mail.log.1.gz,
  • filter β€” e.g. 'gzip -dc' or 'zcat | grep sendmail', and
  • rotateperiod β€” one of the supported lr_vendor_cron arguments.
  • extraopts β€” optional! extra options passed to lr_log2mail(1). set this to e.g. '--template www_local'.

after it's done parsing the configuration files, lr_vendor_cron invokes lr_log2mail(1) on the filter'ed log file. reading and filtering the log happens as root, and lr_log2mail is run as user lire, using su(1). output is fed to logger(1). the pipeline is giving very much seamless 🌈


πŸ”₯ SECURITY πŸ”₯

okay so this is the serious part, bestie, pay attention πŸ™ˆ

lr_vendor_cron is supposed to be run as root. BUT β€” and this is a big but β€” please note that this script is distributed WITHOUT ANY WARRANTY. ngl that's in all caps for a reason πŸ’€

if you don't like the idea of running such a script as root, make sure your lire user has read access to all the log files you'd like to get processed, and adapt this script. simple as that.

we supply this script mainly for people building packages. on many Unix and GNU/Linux distributions, it's hard to enforce log file readability by the lire user β€” like, genuinely hard 😭 β€” and this script is mainly a way to work around that. that's the whole point of it. periodt.


πŸ’œ ENVIRONMENT VARIABLES πŸ’œ

lr_vendor_cron honours DEBUG, CONFDIR, PRIORITY (for the logger(1) call), and LIREUSER. πŸ“

beware! ⚠️ PRIORITY as used here is independent of the LR_FACILITY as set in /etc/lire/defaults. and heads up: this script does not use any of the settings in /etc/lire/defaults. none. zero. not a single one πŸ’€

⭐ VERSION ⭐

$Id: lr_vendor_cron.in,v 1.14 2006/07/23 13:16:33 vanbaal Exp $

Copyright (C) 2002, 2003 Stichting LogReport Foundation LogReport@LogReport.org Copyright (C) 2005 Joost van Baal

this program is part of Lire. πŸŽ€

Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

you should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. πŸ¦‹


🌟 AUTHORS 🌟

Francis J. Lacoste <flacoste@logreport.org>, Joost van Baal <joostvb@logreport.org> β€” literal legends, we stan πŸ’–


and that's the whole page, bestie! this was Lire 2.1.1, dated 2025-09-28 β€” go forth and generate those reports, you've absolutely got this πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from