Modifying and Installing Configuration Files

BATTS has three configuration files that need to be installed in /etc: batts.myrc, battsrc, and batts-reply.txt. Sample files are included in the config_files subdirectory of the BATTS distribution; each of these files must be modified before you can use BATTS.

The batts.myrc file contains the database connection information. It includes the host name, database user, and password for the BATTS database. You will need to change the host= and pass= lines of the configuration file, at a minimum. We recommend sticking with batts as the user name, but you can change this as well if you desire.

The battsrc file contains configuration information required by the BATTS program for sending mail. This file is read directly by Perl, and is in fact live Perl code. If you don't have any complex configuration, this file is quite simple. These are variable assignments, which are of the general form

$variable = 'value';
All Perl variable names (the ones we care about, anyway) begin with a dollar sign. The only two configuration variables supported at present are $return_address and $sendmail. You should not need to alter the assignment statements except for the values indicated between single quotes.

The $return_address variable should be set to the return address for the ticket-by-mail system. If you choose not to use the ticket-by-mail system, then set this to something that will be seen by a live person, as it will also be used as the return address when mailing customers the resolutions to their problems.

The $sendmail provides the full path to the sendmail executable and its required command-line options. At a minimum, the -oi and -t options are required; the -odq option queues the message in the local sendmail queue. If the host on which you run BATTS does not automatically send queued mail, remove this option. Many systems do not have the sendmail binary in /usr/sbin/sendmail as is standard on most Linux systems; other Unix flavors tend to use /usr/lib/sendmail instead. If the path is wrong, then sendmail will not be run and mail can not be sent.

The batts-reply.txt file includes the text of the message sent to users when a new ticket is generated. At the very least, change the e-mail address included in the message to point to your system.

Installing the files are easy. Simply copy them to your /etc directory, change the group to batts, and change the file mode to 0640. This can be done with the following sequence of commands executed from the config_files subdirectory of the BATTS distribution:

cp batts.myrc battsrc batts-reply.txt /etc
pushd /etc
chgrp batts batts.myrc battsrc batts-reply.txt
chmod 0640 batts.myrc battsrc batts-reply.txt