	Pug v0.1

WHAT IS PUG?

  Pug is a small script/program to control the naughty bits of a CNews
  system running newsx as it's transport. Pug *requires* CNews & NewsX,
  in addition to a 5.xxx Perl interpreter.


INSTALLATION

  Pug must be installed by hand. Edit pug.pl, changing any variables needed
  to point to their correct locations. Make sure you tell pug where your
  Perl interpreter resides. Copy Pug to any location you deem appropriate
  (I use /usr/lib/news/bin). chown news.news pug, and chmod 550 pug...
  You're almost there.


RUNNING PUG

  Pug was really designed to be run on a system with a direct connection
  to the internet, however, it may be possible to get some sort of
  functionality out of it on machines with a temporary connection. YMMV.

  On a machine with a 24/7 connection, add the following to your rc.local,
  or wherever you feel it most appropriate:
  /bin/su - news -c /usr/lib/news/bin/pug &

  On a machine with a temporary connection, add the following IN ADDITION to
  the line for a 24/7 machine:
  /bin/sleep 1s
  echo sleep >/var/lib/news/.Pug.fifo

  Then, in your ip-up, put the following:
  echo cont >/var/lib/news/.Pug.fifo

  And in your ip-down, put the following:
  echo sleep >/var/lib/news/.Pug.fifo

  If you ever need to kill Pug (say, perhaps, for system shutdown),
  issue a:
  echo die >/var/lib/news/.Pug.fifo

  A few notes: You must have write access to the fifo (obviously) for the
  commands to work. This means either being root, or news, or changing the
  mode that pug creates the fifo with (bad idea), or adding yourself to the
  group pug belongs to (usually news).

  Pug understands 3 commands via it's FIFO. They are:
  DIE   : Causes pug to quit, as soon as it has finished it's current
          operation. It can take quite a while before this happens, but it
          WILL eventually die. Pug will exit immediately if it was sleeping.
  SLEEP : Causes pug to stop operating (after it has finished it's current
          operation) and wait. It uses no processor time while sleeping.
  CONT  : Causes Pug to continue (wake up) from sleeping, picking up where
          it left off.

  Pug's commands are not case-sensitive. DIE is Die is dIe. Capiche?


FUTURE OF PUG

  Pug's future depends on my time (which I have almost 0 of these days),
  comments (both for improvements and for criticisms), and acceptance.
  Pug does what I need it to. If you need it to do something more, tell me
  and we'll see if it can't be added.


AUTHOR

  Tod D. ihde
  <toon@waste.org>


TODO

  Have pug fork to the background automatically.
  Support INN (I don't like INN, btw).
  Have pug respond to error conditions.
