avconfig command

Name

avconfig - Antivirus service configuration helper.

Synopsis

avconfig [-d] [-q] [-h | -V | -C <parameter list> | -U <parameter list>]

<parameter_list>:= <parameter 1> [<parameter 2> <parameter 3> ...]

<parameter>:= --section_name parameter_name=parameter_value

Description

The avconfig command can be used to validate and modify the configuration file, config.ini, for the antivirus tools.

The configuration file consists of three sections:

  • [avsvc] for the antivirus service

  • [avscan] for the on-demand scanner

  • [notify] section which describes notification methods that can be used by either tool.

Configuration options for avsvc are described in the avsvc manual page.

Configuration options for avscan are described in the avscan manual page.

The <params> argument is a space-separated list of section names and option settings. Section names must be preceded by two hyphens. They must precede the setting names. Setting name and setting value must be separated by an equals sign, with the setting name being specified first. Examples are given below.

Root privilege is required to perform operations on the configuration file.

Options

-d Include debug output. This must be the first parameter.

-q Suppress output of product banner

-h Show this man page.

-V Produce a validation report for the current config.ini file.

-C <params>

Create a new configuration file by overriding the product defaults.

-U <params>

Create a new configuration file by overriding the current settings in config.ini.

Notification Support

The [notify] section of the configuration file defines commands and options for the notifiers requested in the [avscan] and [avsvc] section. Note that notify names should be in lowercase.

A notifier name is configured through name.cmd and name.options lines in the [notify] section of the configuration file.

The name.cmd parameter is used to specify the name of an executable file that is to perform the notification. The name.options parameter is used to specify the notification events that are to be sent. This is a comma-separated list containing one or more of:

none 

Notifications disabled.

all    

All notification events will occur.

started

Service or program start.

ended 

Service or program end.

error 

Errors reported during scanning.

timeout

Timeouts that occur during scanning.

virus  

Virus detected.

quarantine

File has been quarantined.

delete 

File has been deleted.

repair 

File has been repaired.

Notification Action

When executed, the notification command will receive notification text on standard input. A sample notification script, notify-example.sh, is available in the installation directory.

The following environment variables will be available at runtime:

PTAV_HOME

The product installation directory.

PTAV_VERSION

The version of the antivirus software.

PTAV_ENGINE

The antivirus engine version and database level.

PTAV_DAT_AGE

The age, in days, of the antivirus database.

PTAV_NOTIFICATION

The notification event name (started, ended, error, timeout, virus, quarantine, deletion or repair).

PTAV_HOSTNAME

The hostname, as reported by uname.

Examples

EXAMPLE: To revert to product defaults:
avconfig -C
EXAMPLE: To create a configuration file based on product details and override the default avsvc settings for clean and macro options:
avconfig -C --avsvc clean=no macro=no
EXAMPLE: To extend that example to specify settings for notify for both avsvc and avscan, and include some notification configuration:
avconfig -C --avsvc clean=no macro=no notify=default --avscan notify=default,mailme --notify mailme.cmd=\${PTAV_HOME}/notify-example.sh mailme.options=started,ended
EXAMPLE: To change the current configuration to set the avsvc threads value:
avconfig -U --avsvc threads=8

See also: avsvc and avscan.

Changes to On-Access Scanning

In order for changes to on-access scanning to take effect, the on-scan service must be restarted in order to reload the settings.

To change the on-access scan settings to exlude directory /db2 and its subdirecctories from scanning and immediately effect the change, run the following commands:

avconfig -U --avsvc exclude=/db2

avsvcctl reload

Exit Status

On success, 0 is returned, a non-zero failure code otherwise.