>       Is it possible to run a rebol script as a deamon, that is, running
> in the background, over and over again?

Sure.  I wrote a daemon to take care of traffic on my news server 
during those times that the real daemon was off-line.

This was originally developed under REBOL 2.0.0 and 2.0.2.

Best regards,
Kev



#!/usr/local/rebol/rebol -sq

REBOL [
   Title:   "Fakenews"
   Date:    "1999/05/11 18:40 PDT"
   Author:  "Kevin McKinnon"
   File:    %fakenews.r
   Email:   [EMAIL PROTECTED]
   Version: 2.0
   Purpose: {
      Pretend to be the real NNTP/NNRP server while it's not around.
      Establishes itself as an NNTP/NNRP server and sends an error message
      indicating that the real server (INN) is off-line, typically for
      history rebuilds.  (Original ver 1.0 was Perl)
      Security note: This script binds to a priviledged port (<1024) so must
      execute as ROOT.
   }
]

secure none
newsport: open tcp://:119
while [j: true] [
  clientport: first newsport
  insert clientport reduce ["502 news.dockmaster.net (RNews 0.1) Server is "
                            "not available right now. "
                            "It is now " now 
                            "  --Dockmaster Usenet News Admin^M^J"]
  close clientport
]
close newsport

------- End of forwarded message -------
------------------------------------------------------------------------
Kevin McKinnon, Network Engineer                 [EMAIL PROTECTED]
Sunshine Communications                     http://www.sunshinecable.com

PGP Public Key: http://www.dockmaster.net/pgp.html   PGP 6.0 www.pgp.com

Reply via email to