Using LinkController: Configuration

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 2. Configuration

> 2.1 Setting Configuration Variables |  |
> 2.2 Setting Configuration Variables |  |
> 2.3 Link Control Configuration Variables |  | General configuration variables.
> 2.4 Configuring Infostructures |  |

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 2.1 Setting Configuration Variables

The `configure-link-control` program can be used by users to configure LinkController. This will ask you a series of questions and then generate a configuration in your home directory.

The configuration that is controlled by this program is related to reporting and fixing links. For other configuration see See section 14. Administration.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 2.2 Setting Configuration Variables

All of the variable information is stored in the file ``.link-control.pl'` in your home directory or ``/etc/link-control.pl'` for systemwide configuration. The configuration files are written directly in Perl (the programming language LinkController is written in). You can set the configuration variables by putting lines like this.

    $::links='/var/lib/link_database.bdbm';

Please note the semi colon at the end of the line and the use of single quotes so that Perl doesn't do anything strange to your values.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 2.3 Link Control Configuration Variables

`$::user_address`
  is the email address which the robot declares to the world as it goes around checking links. If you want to check links yourself, you must set this to a valid email address, because if something goes badly wrong, it is the only way for a user at another site to know how to contact you.

`$::base_dir`
  This is the base directory for all of the configuration files. If this variable is defined then the other variables will default as given below and do not need to be set individually.

`$::links`
  tells you what file is being used to store information about links. This could easily be a shared database used by everyone on your system. Defaults to ``$::base_dir/links.bdbm'`.

`$::schedule`
  tells the system where to find the schedule file used to decide which links should be checked next and when that should be. You will need to set this and create the file in order to do link checking. Defaults to ``$::base_dir/schedule.bdbm'`.

`$::page_index`
  tells the system where to find the schedule file used to decide which links should be checked next and when that should be. You will need to set this and create the file in order to do link checking. Defaults to ``$::base_dir/page_has_link.cdb'`.

`$::link_index`
  tells the system where to find the schedule file used to decide which links should be checked next and when that should be. You will need to set this and create the file in order to do link checking. Defaults to ``$::base_dir/link_on_page.cdb'`.

`$::infostrucs`
  This variable points to the configuration file where definitions of infostructures are should be put See section 2.4 Configuring Infostructures. Defaults to ``$::base_dir/infostrucs'`.

`$::link_stat_log`
  This variable is the name of a file where important link status changes will be logged. The current definition is links which have just been discovered to be broken. This can be used in email notification. See section 7.1 Email Reporting of Newly Broken Links.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 2.4 Configuring Infostructures

The infostructure configuration is used to find links within the pages when we are building our databases. It is kept in a separate file defined by the `$::infostrucs` configuration variable.

The format of the file is one line for each infostructure with configuration directives separated by spaces. For example

    directory http://example.com/manual /var/www/html/manual
    www http://example.com/strange_database

The first directive describes how `extract-links` program should extract the links. It currently has three possible values. The value `www` means to actually use the given URL to download the web pages. The value `directory` means that `extract-links` should assume that all of the files are stored in a directory and that the directory structure matches the structure of the infostructure. The final value "advanced"

In the case where we use the `directory` directive, a third directive is present on each line with the full path to the base directory of the infostructure.

More advanced configuration is possible by defining the information directly in perl.

[ << ] | [ >> ] |  |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated by Michael De La Rue on December, 30 2001 using texi2html