| 1 |
# Sample clamav-update.conf |
| 2 |
# In the default, put this file to /usr/local/clamXav/etc/ . |
| 3 |
# If you want to use the other file, issue clamav-update.pl with --config |
| 4 |
# option. |
| 5 |
# ex) clamav-update.pl --config /etc/clamav-update.conf |
| 6 |
|
| 7 |
# $Id: clamav-update.conf,v 1.11 2009/11/01 23:43:27 okamura Exp $ |
| 8 |
|
| 9 |
#### Logging #### |
| 10 |
# log destination |
| 11 |
# GLOB destinations |
| 12 |
# \*STDOUT - standerd output |
| 13 |
# \*STDERR - standerd error output |
| 14 |
# Syslog destinations |
| 15 |
# 'unix' - unix domain socket |
| 16 |
# ['stream', 'FILE_PATH'] - the file of which path name is FILE_PATH |
| 17 |
# 'inet' - INET socket (either tcp or udp, tried in that order) returned by getservbyname() |
| 18 |
# 'tcp' - tcp socket returned by getservbyname() |
| 19 |
# 'udp' - udp socket returned by getservbyname() |
| 20 |
# 'console' - console |
| 21 |
#$Setting{logging}->{setlogsock} = \*STDERR; |
| 22 |
|
| 23 |
# log level |
| 24 |
# 'emerg' - A panic condition. |
| 25 |
# 'alert' - A condition that should be corrected immediately. |
| 26 |
# 'crit' - Critical conditions. |
| 27 |
# 'err' - Errors. |
| 28 |
# 'warning' - Warning messages. |
| 29 |
# 'notice' - Conditions that are not error conditions, but should possibly be |
| 30 |
# handled specially. |
| 31 |
# 'info' - Informational messages. |
| 32 |
# 'debug' - Messages that contain information normally of use only when |
| 33 |
# debugging a program. |
| 34 |
#$Setting{logging}->{setlogmask} = 'warning'; |
| 35 |
|
| 36 |
# log identity (only syslog) |
| 37 |
# 'NAME' - NAME is prepended to every message. |
| 38 |
#$Setting{logging}->{openlog}->{ident} = 'clamav-update'; |
| 39 |
|
| 40 |
# log options (only syslog) |
| 41 |
# ['OPTION1', 'OPTION2' ...] or [qw(OPTION1 OPTION2 ...)] |
| 42 |
# ndelay - Open the connection to syslogd(8) immediately. |
| 43 |
# perror - Write the message to standard error output as well to the system log. |
| 44 |
# pid - Log the process id with each message. |
| 45 |
#$Setting{logging}->{openlog}->{logopt} = [qw()]; |
| 46 |
|
| 47 |
# log facility (only syslog) |
| 48 |
# 'console' - Messages written to /dev/console by the kernel console output |
| 49 |
# driver. |
| 50 |
# 'daemon' - System daemons, such as routed(8), that are not provided for |
| 51 |
# explicitly by other facilities. |
| 52 |
# 'mail' - The mail system. |
| 53 |
# 'news' - The network news system. |
| 54 |
# 'user' - Messages generated by random user processes. |
| 55 |
# 'local1' - for other purpose. |
| 56 |
# 'local2' - for other purpose. |
| 57 |
# 'local3' - for other purpose. |
| 58 |
# 'local4' - for other purpose. |
| 59 |
# 'local5' - for other purpose. |
| 60 |
# 'local6' - for other purpose. |
| 61 |
# 'local7' - for other purpose. |
| 62 |
#$Setting{logging}->{openlog}->{facility} = 'local6'; |
| 63 |
|
| 64 |
|
| 65 |
#### Environment Variables #### |
| 66 |
# $Setting{environment}->{VARNAME} = 'VALUE'; |
| 67 |
# PATH |
| 68 |
#$Setting{environment}->{PATH} = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/clamXav/bin'; |
| 69 |
|
| 70 |
|
| 71 |
#### Getting Version Method #### |
| 72 |
# latest version |
| 73 |
# command to get |
| 74 |
#$Setting{version}->{latest}->{command} = [qw(host -t txt current.cvd.clamav.net)]; |
| 75 |
|
| 76 |
# the regular expression that is applied to command output |
| 77 |
#$Setting{version}->{latest}->{regexp} = qr/"(\d+(?:\.\d+)*):\d+:\d+:\d+:[^"]*"\s*$/; |
| 78 |
|
| 79 |
# current version |
| 80 |
# command to get |
| 81 |
#$Setting{version}->{current}->{command} = [qw(clamav-config --version)]; |
| 82 |
|
| 83 |
# the regular expression that is applied to command output |
| 84 |
#$Setting{version}->{current}->{regexp} = qr/^(\d+(?:\.\d+)*)\s*$/; |
| 85 |
|
| 86 |
# version string compare function |
| 87 |
#$Setting{version}->{compare} = sub { |
| 88 |
# my ($a, $b) = @_; |
| 89 |
# my @a = reverse(split(/\./, $a)); |
| 90 |
# my @b = reverse(split(/\./, $b)); |
| 91 |
# |
| 92 |
# while (0 < scalar(@a) and 0 < scalar(@b)) { |
| 93 |
# $a = pop @a; |
| 94 |
# $b = pop @b; |
| 95 |
# return -1 if ($a < $b); |
| 96 |
# return 1 if ($a > $b); |
| 97 |
# } |
| 98 |
# return 1 if (0 < scalar(@a)); |
| 99 |
# return -1 if (0 < scalar(@b)); |
| 100 |
# return 0; |
| 101 |
#}; |
| 102 |
|
| 103 |
|
| 104 |
#### Options #### |
| 105 |
# These settings will be overwrited with command line options. |
| 106 |
# download from |
| 107 |
#$Setting{option}->{src} = { |
| 108 |
# template => 'http://jaist.dl.sourceforge.net/project/${NAME}/${NAME}/${VERSION}/${NAME}-${VERSION}.${EXT}', |
| 109 |
# params => { |
| 110 |
# '${NAME}' => \$Setting{option}->{name}, |
| 111 |
# '${VERSION}' => \$LatestVersion, |
| 112 |
# '${EXT}' => \$Setting{option}->{ext}, |
| 113 |
# }, |
| 114 |
#}; |
| 115 |
# Simple way: |
| 116 |
#$Setting{option}->{src} = 'BASE_URL'; |
| 117 |
# It's equivalent to |
| 118 |
#$Setting{option}->{src} = { |
| 119 |
# template => 'BASE_URL/${NAME}-${VERSION}.${EXT}', |
| 120 |
# params => { |
| 121 |
# '${NAME}' => \$Setting{option}->{name}, |
| 122 |
# '${VERSION}' => \$LatestVersion, |
| 123 |
# '${EXT}' => \$Setting{option}->{ext}, |
| 124 |
# }, |
| 125 |
#}; |
| 126 |
# ClamAV mirrors |
| 127 |
# Japan Advanced Institute of Science and Technology (Ishikawa, Japan, JP) |
| 128 |
# http://jaist.dl.sourceforge.net/project/ |
| 129 |
# National Central University (Taiwan, TW) |
| 130 |
# http://ncu.dl.sourceforge.net/project/ |
| 131 |
# National Center for High-Performance Computing (Tainan, Taiwan, TW) |
| 132 |
# http://nchc.dl.sourceforge.net/project/ |
| 133 |
# Biznet Networks (Indonesia) |
| 134 |
# http://biznetnetworks.dl.sourceforge.net/project/ |
| 135 |
# Internode (Adelaide, Australia) |
| 136 |
# http://internode.dl.sourceforge.net/project/ |
| 137 |
# Waix (Perth, Australia) |
| 138 |
# http://waix.dl.sourceforge.net/project/ |
| 139 |
# Transact (Canberra, Australia) |
| 140 |
# http://waix.dl.sourceforge.net/project/ |
| 141 |
# Swedish University Computer Network (Sweden) |
| 142 |
# http://sunet.dl.sourceforge.net/project/ |
| 143 |
# German Research Network (Berlin, Germany) |
| 144 |
# http://dfn.dl.sourceforge.net/project/ |
| 145 |
# Mesh Solutions (Duesseldorf, Germany, DE) |
| 146 |
# http://mesh.dl.sourceforge.net/project/ |
| 147 |
# University of Kent (Kent, UK) |
| 148 |
# http://kent.dl.sourceforge.net/project/ |
| 149 |
# SWITCH (Lausanne, Switzerland, CH) |
| 150 |
# http://jaist.dl.sourceforge.net/project/ |
| 151 |
# HEAnet (Dublin, Ireland, IE) |
| 152 |
# http://heanet.dl.sourceforge.net/project/ |
| 153 |
# Free France (France, Europe) |
| 154 |
# http://freefr.dl.sourceforge.net/project/ |
| 155 |
# OVH (Paris, France, FR) |
| 156 |
# http://ovh.dl.sourceforge.net/project/ |
| 157 |
# garr.it (Bologna, Italy, it) |
| 158 |
# http://garr.dl.sourceforge.net/project/ |
| 159 |
# iWeb (Montreal, Canada) |
| 160 |
# http://iweb.dl.sourceforge.net/project/ |
| 161 |
# Softlayer (Plano, TX, USA) |
| 162 |
# http://softlayer.dl.sourceforge.net/project/ |
| 163 |
# Voxel (New York, New York, US) |
| 164 |
# http://voxel.dl.sourceforge.net/project/ |
| 165 |
# Centro de Computacao Cientifica e Software Livre (Curitiba, Brazil, BR) |
| 166 |
# http://ufpr.dl.sourceforge.net/project/ |
| 167 |
|
| 168 |
|
| 169 |
# download to |
| 170 |
#$Setting{option}->{dst} = tempdir(CLEANUP => 1); |
| 171 |
|
| 172 |
# package name (don't change for clamav) |
| 173 |
#$Setting{option}->{name} = 'clamav'; |
| 174 |
|
| 175 |
# archive file extention (don't change for clamav) |
| 176 |
#$Setting{option}->{ext} = 'tar.gz'; |
| 177 |
|
| 178 |
# force install |
| 179 |
#$Setting{option}->{force} = 0; |
| 180 |
|
| 181 |
# update limit |
| 182 |
# version supremum |
| 183 |
#$Setting{option}->{limit}->{version} = undef; |
| 184 |
|
| 185 |
# phase name for limited action |
| 186 |
#$Setting{option}->{limit}->{action} = undef; |
| 187 |
|
| 188 |
|
| 189 |
#### Update Phases Sepcification #### |
| 190 |
# phase sequence |
| 191 |
# each item must be defined as key of %Phase. |
| 192 |
#$Setting{phase}->{sequence} = [qw(download extract build install)]; |
| 193 |
|
| 194 |
# custom phase specifier |
| 195 |
# built-in specifier: |
| 196 |
# \&PhaseSpecifier4General |
| 197 |
# install ClamAV to /usr/local/ from tar.gz file. |
| 198 |
# \&PhaseSpecifier4ClamAV4ClamXav |
| 199 |
# install ClamAV to /usr/local/clamXav/ from tar.gz file. |
| 200 |
# change owner and group of some files or directories. |
| 201 |
# \&PhaseSpecifier4PkgOnDmg |
| 202 |
# install something from pkg file in dmg file. |
| 203 |
# (for Mac OS X) |
| 204 |
# \&PhaseSpecifier4ClamavUpdate |
| 205 |
# install clamav-update to /usr/local/ from tar.gz file. |
| 206 |
# \&PhaseSpecifier4ClamavUpdate4ClamXav |
| 207 |
# install clamav-update to /usr/local/clamXav/ from tar.gz file. |
| 208 |
# (see clamav-update.pl for detail.) |
| 209 |
# You can use your no-name function. |
| 210 |
# ex) sub { ... } |
| 211 |
# See PhaseSpecifier4General and PhaseSpecifier4ClamAV4ClamXav definition |
| 212 |
# on clamav-update.pl. They are good samples. |
| 213 |
#$Setting{phase}->{specifier} = \&PhaseSpecifier4ClamAV4ClamXav; |
| 214 |
|
| 215 |
|
| 216 |
#### DO NOT EDIT #### |
| 217 |
1; |