rlockd -- A radio-clock daemon for GNU/Linux-based operating systems.

Copyright © 2008 John Sennesael. See the COPYING file for license details.
-------------------------------------------------------------------------------

SUMMARY:

rclockd will systematically update the system time to synchronise it with a 
radio clock attached to the serial port.

By default, the configuration is read from /etc/rclockd.conf - an alternative
configuration file can be specified using the -c option (see below for a list 
of valid settings).

The -d (daemon) option will start rclockd in the background and write any output 
messages to the log file specified in the configuration. There is no default log 
file, so by default output is not logged. Only startup and shutdown notices are 
logged by default, unless the -v (verbose) option is given. With this option, 
rclockd shall output the `date` command it is executing with the time received 
from the radio clock.

Passing the -h option to the program will show help with all possible command-
line parameters, duplicated below:

-------------------------------------------------------------------------------

USAGE:

Usage: src/rclockd [OPTION]... [FILE]...

-h              Shows program help.
-c <file>       Specifies configuration file location.
-d              Run as daemon.
-v              Verbose. This will output the date command to be called.

-------------------------------------------------------------------------------

LOG FILE SYNTAX:


The log file is in the format: option = value - where each option/value pair is
on a separate line. Empty lines do not matter. Lines starting with a # 
character will be ignored and can be used as comments.


Valid options:
==============

delay : Value in seconds of how frequent rclockd should fetch the time from the 
        clock and update the system time. (default: 5)
          
          Example:
          
          delay = 20
        

logfile : Path to the file to which logging information will be written.
          (no default setting - logging is disabled by default)
          Example:
          
          logfile = /var/log/rclockd.log

date : Path to the date program. (default: /bin/date)

          Example:
          
          /usr/local/bin/date

logverbose : Binary boolean value (1 or 0) indicating whether or not to log the 
             date commands called including the time received by the clock.
             Do not enable verbose logging when you have a small delay to prevent
             the log file from filling up the hard drive. If you do, make sure to
             enable logrotate to flush the log file periodically. If verbose
             logging is enabled, a log entry will be written to the file for every
             interval specified in the delay setting.

          Example:

          logverbose = 1

-- For additional information run `man rclockd` after rclockd is 
   installed system-wide.


COMPILING AND INSTALLING
========================

1) rclockd depends on the boost c++ libraries. Make sure you have the boost
   headers installed before compiling.
2) Other than boost, if you have the standard build tools installed (gcc/g++,
   automake,autoconf,libtool,etc...) you should be able to just run:

   ./configure

   make

3) The binary will be built to src/rclockd at this point. Now you can install
   rclockd system-wide. This will also install the man page documentation:

   make install

4) An init script which can be used with centos/fedora/rhel can be found in the 
   scripts/ folder after compiling. Copy this file to /etc/init.d 
   eg:

   cp scripts/rclockd /etc/init.d/.
   chmod +x /etc/init.d/rclockd

   You now use this script to start/stop/restart rclockd using the commands below:

   service rclockd start
   service rclockd stop
   service rclockd restart

   To automatically start rclockd at boot, run:

   chkconfig --add rclockd

   To no longer start rclockd at boot, run:

   chkconfig --del rclockd


UNINSTALLING
============

From the souce root directory, after ./configure type:

  make uninstall


