~ubuntu-branches/ubuntu/edgy/clamav/edgy

« back to all changes in this revision

Viewing changes to debian/clamav-daemon.init

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2006-05-04 16:10:19 UTC
  • Revision ID: james.westby@ubuntu.com-20060504161019-i4wsbwowzt0i31xb
Tags: 0.88.1-1ubuntu2
* debian/clamav-daemon.init.
  + Fixed init script. (Closes: Malone #39263)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
SUPERVISORNAME=daemon
18
18
SUPERVISORPIDFILE="/var/run/clamav/daemon-clamd.pid"
19
19
SUPERVISORARGS="--name=$NAME --respawn $DAEMON -F $SUPERVISORPIDFILE"
 
20
SUPERVISORPIDDIR="$(dirname $SUPERVISORPIDFILE)"
 
21
CLAMUSER="$(grep "^User" ${CLAMAVCONF} | awk '{print $2}')"
 
22
CLAMSOCKETDIR="$(dirname $(grep "^LocalSocket" ${CLAMAVCONF} | awk '{print $2}'))"
20
23
 
21
24
[ -x "$DAEMON" ] || exit 0
22
25
[ -r /etc/default/clamav-daemon ] && . /etc/default/clamav-daemon
58
61
 
59
62
case "$1" in
60
63
  start)
 
64
  [ -x $CLAMSOCKETDIR ] && chown $CLAMUSER $CLAMSOCKETDIR -R
 
65
  [ -x $SUPERVISORPIDDIR ] && chown $CLAMUSER $SUPERVISORPIDDIR -R
61
66
  if [ -z "$RUN_SUPERVISED" ] ; then
62
67
    log_daemon_msg "Starting $DESC" "$NAME"
63
68
    start_daemon -p $THEPIDFILE $DAEMON