
Configuring Avira Updater
------------------------

With Avira Updater you can update Avira software on your computers, 
using Avira update servers. The program can be configured either by 
editing the configuration file, or by using command line options.

Avupdate supports transfer protocols like: FTP, HTTP, HTTPS and
proxies. On Windows also the Samba protocol is supported allowing 
updates from a shared folder. On all operating systems it is possible
to update from a locally mounted folder or drive. For example, it
is possible to update from a folder or subst drive on Windows and
from a locally mounted folder on Unix no matter where the source
folder resides locally or on the network).
Before downloading and updating product files, the Updater 
reads the configuration from avupdate.conf. 
All parameters from avupdate.conf can be passed to the Updater via
command line. For example:
-parameter in avupdate.conf: 
	temp-dir=/tmp 
-command line: 
	avupdate.bin --temp-dir=/tmp 
The parameter names are not case sensitive.
The configuration parameters for the Updater are listed below.

* General:

--help 
Display help about the Updater options.
Note:
This option is available only in command line.

--version 
Display Updater version.
Note:
This option is available only in command line.

--config 
Contains the path to the configuration file.
avupdate.bin --config=avupdate.conf
Note:
This option is available only in command line.
The default value: avupdate.conf

--no-config
No configuration file. All parameters are given in command line.
Note:
This option is available only in command line.
The default value: false

--quiet
If is present, the updater will not log messages on screen.
Note:
This option is available only in command line.
The default value: false

--show-progress
Show download progress.
The default value: false

* Directories and files:

--temp-dir 
Temporary directory for downloading update files.
avupdate.bin --temp-dir=/tmp
The default value: avupdate_tmp_XXXXXX

--backup-dir 
Backup directory for the existing files, before updating.
The default value: <install directory>\avupdate_backup

--install-dir 
Specifies the installation directory for updated product files. 
avupdate.bin --install-dir=/usr/lib/AntiVir

--update-dir
Specifies the location of engine, vdf and build.dat in order to get the needed informations
for the user-agent string. If this parameter is not given, avupdater will use the path from
"--install-dir" option.

--key-dir
Specifies the directory in which the updater should search for a valid key.

--master-file 
Specifies the master.idx file.
avupdate.bin --master-file=/idx/master.idx

--local-master-file
Specifies the full path to a local master file to be used instead the
one from the install directory.

--product-file 
To specify the idx product file. Example:
avupdate.bin --product-file=/idx/mailgatebin.idx 

--add-var-pair 
Used to define variable and value pairs in the INFO file. Example: 
DESTINATION=%MY_INSTALL_DIR% 
In command line: 
avupdate.bin --add-var-pair=MY_INSTALL_DIR=/usr/lib/<yourproduct>

--internet-srvs 
The list of Internet update servers. 
avupdate.bin "--internet-srvs=http://dl1.pro.antivir.de, http://dl2.pro.antivir.de, http://dl3.pro.antivir.de"
A ftp or a https server can be also used for update. For example:
avupdate.bin --internet-srvs=ftp://server
or
avupdate.bin --internet-srvs=https://server

--peak-handling-srvs
Contains the servers used (ftp, http or https) in case no internet server is available or if both 
'--ipv4-peak-server-limit' and '--ipv6-peak-server-limit' are reached.

--ipv4-peak-server-limit
If both '--ipv4-peak-server-limit' and '--ipv6-peak-server-limit' are reached 
the list of servers from '--peak-handling-srvs' will be used for update. If this
limit is set 0 updater will try to update from all ipv4 servers ('--internet-srvs')
before trying to update from '--peak-handling-srvs' list.
The default value: 0

--ipv6-peak-server-limit
If both '--ipv4-peak-server-limit' and '--ipv6-peak-server-limit' are reached 
the list of servers from '--peak-handling-srvs' will be used for update. If this
limit is set 0 updater will try to update from all ipv6 servers ('--internet-srvs')
before trying to update from '--peak-handling-srvs' list.
The default value: 0

--internet-protocol
The Internet protocol. It can have three values: auto, ipv4, ipv6.
avupdate.bin --internet-protocol=ipv6
The default value: auto

* Update mode:

--mirror
Performs a mirror update(meaning no pre / post / unpost applications are executed)
The default value: false

--check-if-update-available 
When this option is set updater will not install any files. It will only check if an
update is available.
There are two situations:
1) When --skip-master-file is set, updater will download product.info files and it will
check all local files against the online ones. It will also log the files that are dirty
and must be updated.
2) When --skip-master-file is not set, updater will download only master.idx. It will
check only local master.idx against the online one. 
If identical will return "Nothing to update". If not identical will return "Update is available"
The default value: false

--update-modules-list 
Specifies the modules that must be updated (comma-separated list). 

--skip-master-file 
Skip master file (if you want to mirror the entire structure, not only the 
changed files). 
The default value: false

--skip-selfupdate 
Skip installing updater files. 
The default value: false

--no-deltaupdate
Specifies that the updater will not use the delta update feature.
The default value: false

--no-version-check
Specifies that the updater will not check the files version on mirror mode. 
In this case it will check only md5.
The default value: false

--no-signature-check
Specifies that the updater will not check if the files are signed.
Note:
Only uncompressed binary files are checked. 
The default value: true

--ext-program-timeout
Timeout for waiting an executed pre / post / unpost application (in seconds).
The default value: 1800 s

--depend
If this option is not present, the updater will use the new depend functionality.
Description:
When in the product info file, module 1 depends on module 2 and we have 
"update-modules-list=module 1", both modules 1 and 2 will be updated.
The default value: false

--ignore-srvs-list
For updates from a share or internal http server the Updater must
ignore the servers list present in the IDX file and download everything from
inside the network and not from the Internet.
The default value: false

* Connection settings:

--user-agent
Specifies the user agent string which is reported to the http server.
The default value: AntiVir-UpdateCP/<updater version> (<target>;<product>; 
AVE <engine version>; VDF <version>; <language>; <operating system>)
Example:
AntiVir-UpdateCP/0.0.21 (SELFUPDATE, VDF, AVE2, SAVAPI3;
SAVAPI3-LINUX_GLIBC22-EN; AVE 8.1.1.23; VDF 7.0.6.157; EN; LINUX_GLIBC22_I386)

--system-proxy
Tells the updater to use system proxy settings.
The default value: false

--proxy-username 
Username for proxy authentication. 

--proxy-password 
Password for proxy authentication. 

--proxy-host 
The name of the proxy server. 

--proxy-port 
Proxy port. 

--username 
Username for accessing a shared folder, a ftp server or a http server. 

--password 
The password for accessing a shared folder, a ftp server ar a http server.

--update-auth-type
Authentication type that will be used for update. It can be one of the following:
'basic', 'digest', 'ntlm' and 'any'. If 'any' is chosen avupdate will first query the
site to see which authentication methods it supports and then pick one of them.
The default value: any

--connect-timeout 
The maximum time in seconds that the connection to the server is allowed to take.
This only limits to the connection phase. After this, it is not used anymore.
The default value: 30 seconds

--receive-timeout 
The timeout (in seconds) for receiving a response after a request to an update server.
The default value: 30 seconds

--retries 
Number of retries.
The default value: 0
Note:
The retry mechanism is only applied to the download errors. In case of connect errors
there is a 'retries' number with the value 0 and cannot be changed.

--retry-timeout 
Timeout between retries (in seconds). 
The default value: 0 seconds

* Notification emails:

--mailer
Specify the method for sending mails. Can have one of the following values:
  smtp      -  for using own smtp engine
  sendmail  -  for using sendmail binary
The default value: smtp

--sendmail-path
When --mailer is set sendmail, this parameter specifies the local path of
sendmail binary.
On unix the default value is: /usr/sbin/sendmail. It also searches in /usr/lib/sendmail

--sendmail-arguments
If --mailer is set sendmail, this parameter specifies the arguments for running
sendmail binary.
On unix the default value is: -oem -oi

--email-to 
Receiver of the notification emails, if --notify-when is not 0 (see below). 
The default value: root@localhost

--email-from
Sender of the notification emails, if --notify-when is not 0 (see below). 
The default value: root@localhost

--notify-when 
To send email notifications to the address set with --email-to. This 
option can have one of four values: 
	0 - no email notifications are sent (default value), 
	1 - email notifications are sent in case of "successful update",
	"unsuccessful update", or "up to date". 
	2 - email notification only in case of "unsuccessful update". 
	3 - email notification only in case of "successful update".
The default value: 0

--email-footer 
The default footer of the notification emails is: 
-- Avira AntiVir Copyright (c) 2010 by Avira GmbH. All rights reserved. 
It can be changed using --email-footer: 
avupdate.bin --email-to=<yourmail@domain.com> --email-footer=
<custom footer> 

--auth-method 
When set in avupdate.conf, the Updater requires the smtp login data: 
smtp-user and smtp-password (see bellow), in order to send email
notifications to the address set with --email-to. 
The default value: false

--smtp-user 
If notify-when is not 0 and auth-method is set in avupdate.conf, the
Updater requires the smtp login data: smtp-user and smtp-password. 

--smtp-password 
If notify-when is not 0 and auth-method is set in avupdate.conf, the
Updater requires the smtp login data: smtp-user and smtp-password. 

--smtp-server 
The smtp server for sending email notifications, if --notify-when is not 0. 

--smtp-port 
The smtp port for sending email notifications, if --notify-when is not 0. 
The default value: 25

--smtp-timeout
Timeout for receiving data when connecting to a smtp server (in seconds). 
The default value: 30 seconds

* Logfile:

--log 
Specifies a different name of the logfile. The default name: avupdate.log 
Note:
If this option is not present, a default logfile with the name 'avupdate.log'
will be created in the same directory as the updater binary.

--log-rotate 
Overwrite logfiles by rotation. For maintaining a log history, up to 10 
recent logfiles will be kept. For example: 
avupdate.log.001, avupdate.log.002, avupdate.log.003, ...,
avupdate.log.010, avupdate.log.001... 
The default value: false
Note:
This parameter is mutual exclusive with --log-append.
If both parameters are present the --log-append behaviour will be ignored.

--log-append 
Append to log file (By default, the log is overwritten).
Note:
This parameter is mutual exclusive with --log-rotate.

--log-template 
Option to specify the format of the logfile. 
The default template used for logging is: 
${DAY}/${MONTH}/${YEAR} ${HOUR}:${MINUTE}:${SECOND}
${FULLHOST}[${PID}]: ${SOURCE}: ${LEVEL}: ${MSG} 
where: 
	${DAY}/${MONTH}/${YEAR}- date format 
	${HOUR}, ${MINUTE}, ${SECOND}- time format 
	${FULLHOST}- hostname 
	${PID}- pid of the program generating the log 
	${LEVEL}- the message level, as set by the program ("DEBUG", 
	"INFO", "MESSAGE", "WARNING", "ERROR", "FATAL", "MAX_LEVEL", 
	"UNDEFINED") 
	${MSG}- the message sent to the log 
Example of log entry: 
	16/07/2008 12:34:04 abc-desktop [18428]: UPD: ERROR: Smtp 
	engine returned error: Connection refused 
The user can specify only the desired information to be logged. 
For example:
-in avupdate.conf: 
	log-template=${MSG} 
-in the command line:
	avupdate.bin --log-template=${MSG} 


Avira Updater can return one of the following codes:
  0  -  successful update
  1  -  nothing to update
 -1  -  unsuccessful update


Example of a configuration file:

		internet-srvs=http://dl.antivir.de/update
		master-file=/idx/master.idx
		product-file=/idx/savapi3-linux_glibc22-en.idx
		install-dir=install
		temp-dir=/tmp/avira

* using a shared folder 
#	Windows:
		internet-srvs=\\server\someshare\update
		master-file=/idx/master.idx
		product-file=/idx/savapi-win32-en.idx
		install-dir=.\install
		temp-dir=.\tmp
		ignore-srvs-list
		
#	Linux:
		internet-srvs=/locally-mounted-folder/update
		master-file=/idx/master.idx
		product-file=/idx/savapi-linux_glibc22-en.idx
		install-dir=./install
		temp-dir=./tmp
		ignore-srvs-list
		
* using a mounted drive on Windows (subst z:\ \\server\share and in the "share" exists the folder "avira-updates\update")
		internet-srvs=z:\avira-updates\update
		master-file=/idx/master.idx
		product-file=/idx/savapi-win32-en.idx
		install-dir=.\install
		temp-dir=.\tmp
		ignore-srvs-list
		


* Updating from IUM

		# Should replace here IUM_SERVER and IUM_PORT with the correct name and port of IUM server
		internet-srvs=http://IUM_SERVER:IUM_PORT/update
		master-file=/idx/master.idx
		product-file=/idx/savapi3-linux_glibc22-en.idx
		install-dir=install
		temp-dir=/tmp/avira
		ignore-srvs-list
