From: Dustin Kirkland Date: Mon, 10 Nov 2008 23:26:03 +0000 (+0100) Subject: documentation for new update-motd, supporting running message modules X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8255673e12fef049b340f7576933d44da6633c27;p=update-motd.git documentation for new update-motd, supporting running message modules of other frequencies --- diff --git a/update-motd.1 b/update-motd.1 index 729295b..55ec0c3 100644 --- a/update-motd.1 +++ b/update-motd.1 @@ -1,12 +1,12 @@ .IX Title "UPDATE-MOTD 1" -.TH UPDATE-MOTD 1 "2008-09-17" update-motd update-motd +.TH UPDATE-MOTD 1 "2008-11-11" update-motd update-motd .SH "NAME" update\-motd \- Automatically update the message-of-the-day (MOTD) .SH "SYNOPSIS" .IX Header "SYNOPSIS" -update\-motd [\-\-disable|\-\-enable|\-\-force] +update\-motd [\-\-disable|\-\-enable|\-\-force] [d|hourly|daily|weekly|monthly] .SH "OPTIONS" .IX Header "OPTIONS" @@ -19,13 +19,30 @@ Allow update-motd to run. This is useful for enabling automatic updates of \fI/ .TP \fB\-\-force\fP Override a disabled update-motd for a single, immediate update of \fI/etc/motd\fP. +.TP +\fBd\fP (Default) +Runs the scripts in /etc/update-motd.d +.TP +\fBhourly\fP +Runs the scripts in /etc/update-motd.d/hourly +.TP +\fBdaily\fP +Runs the scripts in /etc/update-motd.d/daily +.TP +\fBweekly\fP +Runs the scripts in /etc/update-motd.d/weekly +.TP +\fBmonthly\fP +Runs the scripts in /etc/update-motd.d/monthly .SH "DESCRIPTION" .IX Header "DESCRIPTION" -This script executes each script in \fI/etc/update-motd.d/\fP in lexical order, concatenating the status with \fI/etc/motd.tail\fP, and writing the output to \fI/var/lib/motd\fP, which is usually a symbolic link to \fI/etc/motd\fP. +This script executes lists of scripts in lexical order, concatenating and writing the output to \fI/var/lib/motd\fP, which is usually a symbolic link to \fI/etc/motd\fP. + +Users and/or packages should add symbolic links to \fI/etc/update-motd.d/\fP, \fI/etc/update-motd.d/hourly\fP, \fI/etc/update-motd.d/daily\fP, \fI/etc/update-motd.d/weekly\fP, \fI/etc/update-motd.d/monthly\fP, prepended with a two-digit number to define the displayed order, as obeyed by \fBrun-parts(8)\fP. -Users and/or packages should add symlinks to \fI/etc/update-motd.d/\fP, prepended with a two-digit number to define the execution order, as obeyed by \fBrun-parts(8)\fP. +Separate cron jobs will run \fBupdate-motd\fP every 10 minutes, hourly, daily, weekly, and monthly. Each of execution of \fBupdate-motd\fP will run the scripts in the corresponding \fI/etc/update-motd.d/\fP directory. The output of each script will be written and cached in \fI/var/run/update-motd/*\fP, retaining the number and name of the script executed, to preserve the ordering of the output in \fI/etc/motd\fP. After execution of the current set of scripts, all files in \fI/var/run/update-motd/\fP will be concatenated with \fI/etc/motd.tail\fP and written to \fI/etc/motd\fP. The update-motd script will not execute if the file \fI/var/lib/update-motd/disabled\fP exists. One can override this using the \fB--force\fP option. To permanently enable/disable \fBupdate-motd\fP, use: $ sudo update-motd --enable @@ -34,7 +51,7 @@ The update-motd script will not execute if the file \fI/var/lib/update-motd/disa If enabled, timestamp of the last \fBupdate-motd\fP run will be written to \fI/var/run/update-motd.lastrun\fP. .SH FILES -\fI/etc/cron.d/update-motd\fP, \fI/etc/update-motd.d/\fP, \fI/etc/motd.tail\fP, \fI/var/run/motd\fP, \fI/var/lib/update-motd/disabled\fP, \fI/var/run/update-motd.lastrun\fP +\fI/etc/cron.d/update-motd\fP, \fI/etc/update-motd.d/\fP, \fI/etc/update-motd.d/hourly\fP, \fI/etc/update-motd.d/daily\fP, \fI/etc/update-motd.d/weekly\fP, \fI/etc/update-motd.d/monthly\fP, \fI/etc/motd.tail\fP, \fI/var/run/motd\fP, \fI/var/lib/update-motd/disabled\fP, \fI/var/run/update-motd\fP, \fI/var/run/update-motd.lastrun\fP .SH "AUTHOR" .IX Header "AUTHOR"