~ubuntu-branches/ubuntu/saucy/clamav/saucy-backports

« back to all changes in this revision

Viewing changes to debian/clamav-freshclam.config.in

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2014-07-15 01:08:10 UTC
  • mfrom: (0.35.47 sid)
  • Revision ID: package-import@ubuntu.com-20140715010810-ru66ek4fun2iseba
Tags: 0.98.4+dfsg-2~ubuntu13.10.1
No-change backport to saucy (LP: #1341962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
db_version 2.0
10
10
db_capb backup
11
11
 
12
 
# Get user config
 
12
#COMMON-FUNCTIONS#
13
13
 
14
14
FRESHCLAMCONF='/etc/clamav/freshclam.conf'
15
15
 
16
 
if [ -n "$http_proxy" ];then 
 
16
if [ -n "$http_proxy" ]; then 
17
17
  db_set clamav-freshclam/http_proxy "$http_proxy" || true
18
18
fi
19
19
 
20
 
#COMMON-FUNCTIONS#
21
 
 
 
20
# Read the configuration file
22
21
slurp_config "$FRESHCLAMCONF"
23
22
 
24
 
# Set debconf values from config file 
25
 
 
 
23
# Store conf file values as debconf answers - make sure user changes made 
 
24
# outside of debconf are preserved
26
25
[ -f /var/lib/clamav/interface ] && Interface=`cat /var/lib/clamav/interface`
27
26
if [ -n "$Interface" ]; then
28
27
  db_set clamav-freshclam/autoupdate_freshclam ifup.d || true
51
50
  db_set clamav-freshclam/update_interval "$Checks" || true
52
51
fi
53
52
if [ -n "$NotifyClamd" ]; then
54
 
  if is_false "$NotifyClamd"; then
55
 
    db_set clamav-freshclam/NotifyClamd "false" || true
56
 
  else
57
 
    db_set clamav-freshclam/NotifyClamd "true" || true
58
 
  fi
59
 
else
60
 
  db_set clamav-freshclam/NotifyClamd "false" || true
61
 
fi
62
 
if [ -n "$PrivateMirror" ]; then
63
 
  db_set clamav-freshclam/PrivateMirror "$PrivateMirror" || true
64
 
fi
 
53
  # clamav-freshclam/NotifyClamd is a boolean template, but the postinst writes
 
54
  # the path to the clamav-daemon configuration file to the freshclam.conf
 
55
  [ "$NotifyClamd" = "/etc/clamav/clamd.conf" ] && NotifyClamd="true"
 
56
  db_set clamav-freshclam/NotifyClamd "$NotifyClamd" || true
 
57
fi
 
58
set_debconf_value freshclam SafeBrowsing
 
59
set_debconf_value freshclam Bytecode
 
60
set_debconf_value freshclam PrivateMirror
 
61
set_debconf_value freshclam LogRotate
 
62
 
65
63
 
66
64
# States
67
65
 
156
154
    Stateupdate_interval
157
155
    ;;
158
156
    notify_daemon)
159
 
    StateGeneric medium clamav-freshclam/NotifyClamd private_mirror update_interval
 
157
    StateGeneric medium clamav-freshclam/NotifyClamd safebrowsing update_interval
 
158
    ;;
 
159
    safebrowsing)
 
160
    StateGeneric low clamav-freshclam/SafeBrowsing bytecode notify_daemon
 
161
    ;;
 
162
    bytecode)
 
163
    StateGeneric low clamav-freshclam/Bytecode private_mirror safebrowsing
160
164
    ;;
161
165
    private_mirror)
162
 
    StateGeneric low clamav-freshclam/PrivateMirror End notify_daemon
 
166
    StateGeneric low clamav-freshclam/PrivateMirror log_rotate bytecode
 
167
    ;;
 
168
    log_rotate)
 
169
    StateGeneric low clamav-freshclam/LogRotate End private_mirror
163
170
    ;;
164
171
  esac
165
172
done