boardclean for EBBS 3.1
by Ray Rocker (rock@seabass.st.usm.edu)
Last update: May 20, 1995

boardclean is a utility to expire posts in a bbs running EBBS 3.1.
If you have EBBS version 3.0 or 3.01 get cleanpkg-3.0.tar.gz.

It uses a configuration file to specify the default expiration age
and allows individual boards to have their own.


Installation
------------

You must have the EBBS 3.1 source distribution and have libbbs.a built.
Copy boardclean.c to the bbs source directory. It'll need bbs include files.

Build boardclean:
cc -o boardclean boardclean.c libbbs.a

Edit clean.conf to set the default post expiration age and set up any
exceptions you want. Comments in that file explain the syntax and show
some examples.

Next, copy clean.conf to ~bbs/etc. This file can be anywhere really but
for anywhere except ~bbs/etc you'll have to use the -f option.


Usage
-----

Syntax: boardclean [-d bbs-dir] [-f conf-file] [-t] [board ...]

bbs-dir:   Specifies the bbs home directory. Only needed if BBSHOME is 
	   not set in the environment.

conf-file: Specifies an alternate clean.conf file from which to read the
           rules for cleaning. The default is etc/clean.conf.

-t:        Test mode: boardclean tells which ranges of posts would be 
           subject to deletion but does not delete them. Remember that
           marked posts within these ranges will be spared.

board:     Specifies the board(s) to clean. If no boards are given on
           the command line, all boards on the bbs will be cleaned.

boardclean deletes unmarked posts, older than a specified age, on each
board given on the command line (or all boards). The age to apply to
each board, and a default age, are read from the conf-file supplied on
the command line (or the default one). 

boardclean writes a line to stdout for each board it cleans, or would have
cleaned if the -t flag was given. If an error occurs a message is written
to stderr. In addition, for every cleaned board a line is written to
the bbs log file if it is configured and the log level is at least 2.

boardclean may be run from cron(8) to completely automate board cleanups.
You may need to use the -d option in a cron job so boardclean can find
the bbs home directory.

Return values: 0 == success, 1 == error, 2 == usage error.
