diff options
| author | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-08-09 08:41:19 +0000 |
|---|---|---|
| committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-08-09 08:41:19 +0000 |
| commit | 9d829ed05c295df608b4fc108eb1c628fd06fd39 (patch) | |
| tree | c1b27cfe4498f8abef1a61325922906f3e6a32ff /packages/clamav/files/clamav-daemon.init | |
| parent | 1434b204e16e87b7f59f074f3036d5dcbcf0116f (diff) | |
| parent | 6ccac10beeaaa02a86081bd6179fd57c208ad6b1 (diff) | |
merge of '76e1e69496801009ea0aa69c84f76e858978ab99'
and 'db976a98427dd6a195e2cf167e225de2d0206aea'
Diffstat (limited to 'packages/clamav/files/clamav-daemon.init')
| -rw-r--r-- | packages/clamav/files/clamav-daemon.init | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/clamav/files/clamav-daemon.init b/packages/clamav/files/clamav-daemon.init index bab7a184d7..6fd07146ea 100644 --- a/packages/clamav/files/clamav-daemon.init +++ b/packages/clamav/files/clamav-daemon.init @@ -3,18 +3,20 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/clamd NAME="clamd" DESC="ClamAV daemon" -CLAMAVCONF=/etc/clamd.conf +CLAMAV_CONF=/etc/clamd.conf +PID=/var/run/clamav/clamd.pid set -e -test -r /etc/default/clamav-daemon && . /etc/default/clamav-daemon test -x "$DAEMON" || exit 0 -test ! -r "$CLAMAVCONF" && exit 0 -if [ `grep -q "^Example" $CLAMAVCONF` ]; then +if [ ! -r "$CLAMAV_CONF" ]; then + echo "ClamAV configuration file $CLAMAV_CONF not found. Exiting" + exit 0 +fi +if [ `grep -q "^Example" $CLAMAV_CONF` ]; then echo "$DESC is not configured." exit 0 fi -pidfile="`grep ^PidFile $CLAMAVCONF | awk '{print $2}'`" case "$1" in start) @@ -25,7 +27,7 @@ case "$1" in stop) echo -n "Stopping $DESC: " - start-stop-daemon -K -p $pidfile + start-stop-daemon -K -p $PID ;; restart|force-reload) |
