avupdate command
Name
avupdate - Update Virus Definitions.
Synopsis
avupdate [options] [path]
Description
The avupdate command downloads (or copies) virus definition files from a remote location and applies them to the product. McAfee updates virus definitions every day and you should run the avupdate command every day. By default, files will be retrieved from McAfee's HTTP server (http://update.nai.com/products/commonupdater) using curl.
This can be overridden using the --path, --ftp, --wget or --curl options (see below).
To start the update, either change to the product directory or type the full path to the avupdate command:
/opt/sgav/avupdate
The update process must be run by a root user. This is to prevent a non-root user from accidentally (or maliciously) tampering with the files.
Once started, progress messages will appear as follows:
Powertech Antivirus DAT update 5.0.0 starting Tuesday, Mar 05 19 04:20:23 PM Source=http://update.nai.com/products/commonupdater curl http://update.nai.com/products/commonupdater/oem.ini ... Success! Remote DAT level is 9186 Local DAT level is 9136 Performing incremental update... curl http://update.nai.com/products/commonupdater/gdeltaavv.ini ... Success! Running full update... curl http://update.nai.com/products/commonupdater/avvdat-9186.zip ... Success! Expanding avvdat-9186.zip ...
Options
--path
Specifies the path to use to download the files. Use this option to obtain DATs file from a local or network path.
--ftp
Files will be downloaded using the system 'ftp' client. When using FTP, the path argument must be a URL:
ftp://user:password@host:port/directory
If the user and password are not specified, they default to anonymous. If port is not specified it defaults to 21. If directory is not specified, it defaults to '/'. Command output will be sent to log/ftplog.txt.
The following defaults are used unless otherwise specified:
- User: anonymous
- Port: 21
- Directory: /
If neither --path or --ftp is specified the files are retrieved using curl.
--curl
Files will be downloaded using the system 'curl' client, /usr/bin/curl. This is the default option if none of --path, --ftp or --wget options are specified. Command output will be sent to log/curl.log.
--wget
Files will be downloaded using the system 'wget' client, /usr/bin/wget. Command output will be sent to log/wget.log. To specify additional parameters to the wget command, enclose the path and options in quotes (e.g. "ftp://ftp.nai.com/CommonUpdater --tries=10". Be sure to specify at least one space between the path and wget options).
--avget
Files will be downloaded using the product 'avget' client, if it is available on this platform. Command output will be sent to log/avget.log.
--full
Performs a full update of virus definitions instead of an incremental update. Incremental updates transfer fewer bytes, and therefore faster download times.
A full update will always transfer the complete set (approximately 150MB, subject to change).
--cmd <"command-string">
Runs the specified command string after a successful update of virus definitions. This can be useful to execute a user written script to perform additional processing as needed.
--passive
Runs the FTP process using passive mode.
--sscert
Passes options to curl, avget, or wget to have them avoid checks for self-signed server certificates.
--force
Forces an update of the virus definitions even if the files are already up to date.
--savepath <path>
Copies the virus definitions to the specified path after a successful update. Example: avupdate --savepath /dat
To save the output of the avupdate command to a log file, use the redirection operator: /opt/sgav/avupdate > /home/logs/avupdate_log.txt
--version
Prints the program version and build information, then exits.
--Path
Specifies the path to use to download the files. Default is http://update.nai.com/products/commonupdater (subject to change). --curl is the default option if --path, --ftp, or --wget options are not specified.
--ptavrepo
Indicates the path is a PTAV DAT repository. When called via HelpSystems One request, the command references the root file server path and resolves the DAT level subfolder dynamically.
Example:
./avupdate --ptavrepo https://myreposerver.mydomain.com:8023
A similar command could be employed from a command shell:
./avupdate --ptavrepo https://myreposerver.mydomain.com:8023
--help
Displays help text.
Example
/opt/sgav/avupdate
Notes
McAfee updates virus definitions every day and you should run avupdate every day. To schedule using cron, run command "crontab -e" to edit the crontab file using the vi editor. Position the cursor to the end and type i to insert a line. Type the following line to schedule the job to run everyday at 6pm (17):
0 17 * * * /opt/sgav/avupdate > /opt/sgav/log/avupdate.out.
To see the cron log, run "tail /var/adm/cron/log". For more information about scheduling using cron, run "man crontab"
Exit Status
This command returns the following exit values:
0 Process completed successfully.
1 An error occurred.