summaryrefslogtreecommitdiff
path: root/packages/clamav/files/clamav-daemon.init
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2007-08-09 08:41:19 +0000
committerMarcin Juszkiewicz <hrw@openembedded.org>2007-08-09 08:41:19 +0000
commit9d829ed05c295df608b4fc108eb1c628fd06fd39 (patch)
treec1b27cfe4498f8abef1a61325922906f3e6a32ff /packages/clamav/files/clamav-daemon.init
parent1434b204e16e87b7f59f074f3036d5dcbcf0116f (diff)
parent6ccac10beeaaa02a86081bd6179fd57c208ad6b1 (diff)
merge of '76e1e69496801009ea0aa69c84f76e858978ab99'
and 'db976a98427dd6a195e2cf167e225de2d0206aea'
Diffstat (limited to 'packages/clamav/files/clamav-daemon.init')
-rw-r--r--packages/clamav/files/clamav-daemon.init14
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)