================================

 INSTALLING TTC AND TTC DAEMON

================================

This file instructs compiling and installing ttc and ttcd. Please also
read README file.


FIRST NOTE
==========

This version has changed in some parts dramatically from last version
(2.6), so please read all instrutions carefully if you are updating
a new version. A lot has changed.


CONFIGURING TTC AND TTC DAEMON
==============================

Before compiling it is a good idea to check out the configuration file.
Configuration file is config.h. That file includes all the possible 
configuration options you can do. I suggest checking config.h at the 
same time when reading this.


Configuring ttc
===============

DEFOPTION	Default options file is used when you run ttc without any
		arguments. Modify DEFOPTION if default (/etc/ttc.options)
		doesn't suite for you.

CONF_FILE	This is default configuration file (/etc/ttc.config). This
		file includes all configurations for ttc. (See README).
		Modify this if this doesn't suite for you.

There are some other configurable parts for ttc but they aren't really 
important. Check out config.h for them if you want to modify them.


Configuring ttcd
================

DEBUG		By default DEBUGing is defined. If you don't want any log
		messages then do #undef DEBUG. Log messages are saved
		int /var/lock/ttcdlog.

SOCKET_PATH	Path for ttcd socket. Default should suite for you too.

A_TIME		By modifying A_TIME, which is by default 60 minutes, you
		can set the time you want to give user to spare. This is
		the default time limit! Only integers are allowed!

A_MINUTES 	Is the time ttc waits before next round to check if user
		is still logged on and to add A_MINUTES to current time.
		Default is 1 minute, which is fine!

K_SECONDS 	Is the time after warning message is printed to user,  
		session will be killed. Default is 60 seconds.

Again, there are more configurable parts for ttcd too, but they aren't 
really important. Check out config.h for them if you want to modify them.


COMPILING
=========

Before compiling check that config.h and Makefile suites for you.

To compile both programs, just type 'make', which will launch installation
script. If everything went ok, meaning no errors or warnings, then do
'make install' which will install binaries to /usr/local/bin, by default.
Remember that you might need to modify Makefile for some systems, so
check it out before compiling!


AFTER COMPILATION (See also README)
===================================

To run ttc program just include that name, with options (if any), to any 
file which is executed before the user gets his/her shell prompt. For tcsh 
put it in /etc/csh.login and for bash put it in /etc/profile.

And finally, place ttcd daemon program for example to rc.local file, or any 
other file which is executed on every boot. Ttcd remains running on the 
background.

Also, don't forget to add 'ttcd -c' line to crontab and to run it every 
day at 00:00, so that ttcd would remove old time limit files. Add next 
line for example to /var/spool/cron/crontab/root file:

00 00 * * * /usr/local/bin/ttcd -c

and then rerun crond. This will do the trick and removes old time limit 
files every day at 00:00. Note: You *have to* do this if you want that 
time bank system works!!


						Pekka Riikonen
						priikone@fenix.pspt.fi
						9.3.1998
