Like any other piece of software (and information generally),
daemontools comes with NO WARRANTY.


Things you have to decide before starting:

* Where programs will be installed, normally /usr/local/bin. To change
this directory, edit conf-bin now.

* Where man pages will be installed, normally /usr/local/man. To change
this directory, edit conf-man now.


How to install:

 1. Compile the programs:
       % make
 2. Create the formatted man pages, *.0:
       % make man
 3. Install the programs and man pages:
       # make setup
 4. Run instcheck to make sure it doesn't print any warnings:
       # make check


How to test:

 5. Feed a few lines of data to accustamp:
       % (echo one; echo two) | ./accustamp
       869197736.542713 one
       869197736.542752 two
    Each line will be prefixed with a number.
 6. Feed the current date through accustamp and tailocal:
       % date | ./accustamp | ./tailocal
       1997/07/17 22:50:03.262569 Thu Jul 17 22:50:03 CDT 1997
    The initial date and time will agree with the rest of the line.
 7. Create two test directories:
       % mkdir test1 test2
    Run a supervised sleep service using the first test directory:
       % ./supervise test1 sleep 6000 &
    Run a supervised date service, initially stopped, using the second
    test directory:
       % ./supervise -s test2 date &
    Check the status of the two services:
       % cat test1/status test2/status
       869199160 up pid 5260
       869199165 down
       % cat test1/status test2/status | ./tailocal
       1997/07/17 23:12:40 up pid 5260
       1997/07/17 23:12:45 down
 8. Kill the sleep process, using the pid shown in test1/status, to
    simulate a crash:
       % kill 5260
    Check the sleep status again:
       % ./tailocal < test1/status
       1997/07/17 23:14:22 up pid 5281
    You will see the pid of the new sleep process.
 9. Bring the sleep service down:
       % ./svc -d test1
       % ./tailocal < test1/status
       1997/07/17 23:16:12 down, normally up
10. Bring it back up:
       % ./svc -u test1
       % ./tailocal < test1/status
       1997/07/17 23:16:59 up pid 5306
11. Run the date program once:
       % ./svc -o test2
       Thu Jul 17 23:17:30 CDT 1997
    The date will be printed after a second by the background supervised
    date service.
12. Bring the date service up, pause five seconds, and then bring it
    back down:
       % ./svc -u test2; sleep 5; ./svc -d test2
       Thu Jul 17 23:17:47 CDT 1997
       Thu Jul 17 23:17:48 CDT 1997
       Thu Jul 17 23:17:49 CDT 1997
       Thu Jul 17 23:17:50 CDT 1997
    The date will be printed 4 or 5 times, about once per second.
13. Bring both services down:
       % ./svc -d test1 test2
    Destroy both services: find the supervise processes and kill them.
    Then try to use svc:
       % ./svc -u test1 test2
       svc: warning: unable to control test1: device not configured
       svc: warning: unable to control test2: device not configured
14. Create another test directory:
       % mkdir test3
    Feed some text to cyclog:
       % ./cyclog -s 2000 -m 80 -n 5 test3 < Makefile
    cyclog will pause for about 10 seconds. Check that there are at most
    5 files in test3, each under 2000 bytes:
       % ls -l test3
       total 10
       -r--r--r--  1 djb        1963 Jul 18 00:06 @00000869202382
       -r--r--r--  1 djb        1949 Jul 18 00:06 @00000869202383
       -r--r--r--  1 djb        1929 Jul 18 00:06 @00000869202384
       -r--r--r--  1 djb        1945 Jul 18 00:06 @00000869202385
       -r--r--r--  1 djb        1236 Jul 18 00:06 @00000869202386
15. Find the total size of the files in test3:
       % cat test3/* > test3.cat
       % wc -c test3.cat
       9022 test3.cat
    Extract that many bytes from the end of the cyclog input, and
    compare it to the results stored in test3:
       % tail -9022c Makefile | cmp - test3.cat
16. As root, check setuser's group membership assignment:
       # ./setuser joe groups
    Replace joe with your username. You should see your normal gid and
    nothing else. Under Solaris, make sure to use /usr/ucb/groups;
    /usr/bin/groups is broken.


That's it! To report success:
       % ( echo 'First M. Last'; cat `cat SYSDEPS` ) \
         | mail djb-qst@koobera.math.uic.edu
Replace First M. Last with your name.
