~ubuntu-branches/ubuntu/maverick/clamav/maverick-backports

« back to all changes in this revision

Viewing changes to debian/clamav-daemon.init.in

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Gran, Stephen Gran, Michael Tautschnig
  • Date: 2010-04-26 21:41:18 UTC
  • mfrom: (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100426214118-i6lo606wnh7ywfj6
Tags: 0.96+dfsg-4
[ Stephen Gran ]
* Fixed typo in clamav-milter's postinst

[ Michael Tautschnig ]
* Fixed typo in clamav-freshclam's postinst (closes: #579271)
* Debconf translation updates
  - Portuguese (closes: #579068)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
SUPERVISORNAME=daemon
27
27
SUPERVISORPIDFILE="/var/run/clamav/daemon-clamd.pid"
28
28
SUPERVISORARGS="--name=$NAME --respawn $DAEMON -F $SUPERVISORPIDFILE"
 
29
DATABASEDIR="/var/lib/clamav"
29
30
 
30
31
[ -x "$DAEMON" ] || exit 0
31
32
[ -r /etc/default/clamav-daemon ] && . /etc/default/clamav-daemon
89
90
case "$1" in
90
91
  start)
91
92
  OPTIND=1
 
93
  # Check for database existance (start will fail if it's missing)
 
94
  for db in main daily; do
 
95
    if [ ! -e "$DATABASEDIR"/"$db".cvd ] && [ ! -d "$DATABASEDIR"/"$db".inc ] && [ ! -e "$DATABASEDIR"/"$db".cld ]; then
 
96
      log_failure_msg "Clamav signatures not found in $DATABASEDIR"
 
97
      log_failure_msg "Please retrieve them using freshclam or install the clamav-data package"
 
98
      log_failure_msg "Then run '/etc/init.d/clamav-daemon start'"
 
99
      exit 0
 
100
    fi
 
101
  done
92
102
  if [ -z "$RUN_SUPERVISED" ] ; then
93
103
    log_daemon_msg "Starting $DESC" "$NAME "
94
104
    start-stop-daemon --start -o -c $User --exec $DAEMON