cvsextras 47272f
#! /bin/bash
cvsextras 47272f
cvsextras 47272f
# Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
cvsextras 47272f
#  
cvsextras 47272f
# This program is free software; you can redistribute it and/or modify
cvsextras 47272f
# it under the terms of the GNU General Public License as published by
cvsextras 47272f
# the Free Software Foundation; version 2 of the License.
cvsextras 47272f
#  
cvsextras 47272f
# This program is distributed in the hope that it will be useful,
cvsextras 47272f
# but WITHOUT ANY WARRANTY; without even the implied warranty of
cvsextras 47272f
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
cvsextras 47272f
# GNU General Public License for more details.
cvsextras 47272f
#  
cvsextras 47272f
# You should have received a copy of the GNU General Public License
cvsextras 47272f
# along with this program; if not, write to the Free Software
cvsextras 47272f
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
cvsextras 47272f
cvsextras 47272f
# Usage:  clamav-notify-servers
cvsextras 47272f
cvsextras 47272f
CFGFILE=/etc/sysconfig/clamav-servers
cvsextras 47272f
BASE=/var/lock/subsys/clamd.
cvsextras 47272f
INITRDDIR=/etc/init.d
cvsextras 47272f
cvsextras 47272f
ok=1
cvsextras 47272f
fe1f90
f=/usr/sbin/clamav-notify-servers.local
fe1f90
test ! -e "$f" || . "$f"
fe1f90
cvsextras 47272f
for i in ${BASE}*; do
cvsextras 47272f
    test -e "$i" || continue
cvsextras 47272f
cvsextras 47272f
    srv=${INITRDDIR}/clamd.${i##${BASE}}
cvsextras 47272f
    test -e "$srv" || continue
cvsextras 47272f
cvsextras 47272f
    "$srv" reload  || ok=
cvsextras 47272f
done >/dev/null
cvsextras 47272f
cvsextras 47272f
test "$ok"