[Mailman-Users] Checking for Heartbeat

Mark Sapiro mark at msapiro.net
Fri Nov 27 20:33:29 CET 2009


LuKreme wrote:

>On 27-Nov-2009, at 08:56, Mark Sapiro wrote:
>> <http://bazaar.launchpad.net/~mailman-coders/mailman/2.1/files/head%3A/contrib/>
>> where you can download mmdsr and README.mmdsr
>
>Hmm.. the readme and internal docs where not that useful.
>
># Arguments for your mktemp command to specify directory and/or create file.
># For example, HPUX mktemp requires "-c"; FreeBSD doesn't accept "-p <dir>".
> ###############################################################################
>TMPDIR="-p /tmp"
>
>OK, since freeBSD doesn't like the -p option, what should this be? setting it to just "/tmp" generates an error. Setting it to -d /tmp/mmdsr also generates the same basic errors. Yes, the script is running as root.


The equivalent option in FreeBSD is "-t /tmp", at least according to
<http://www.gsp.com/cgi-bin/man.cgi?section=1&topic=mktemp>.


>(I know it has a sleep 60 in it because it's intended to run at 23:59, but that does seem an odd way to go to me).


It runs at 23:59 and sleeps for a minute after getting the current date
to use in filtering the logs. It sleeps to get the last minute in the
logs, and it gets the date before midnite so it doesn't have to figure
out the correct date for 'yesterday'. Granted, it could just run at
midnight and use the "-d yesterday" option for the date command, but
a) I didn't write that part; b) I don't know if "-d yesterday" or
equivalent is universally available in implementations of date, and c)
the impact of a change at this point on existing users makes such a
change problematic.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list