Subversion Repositories configs

Rev

Rev 163 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
163 - 1
#!/bin/sh
2
#
3
# Startup script for the Clam AntiVirus Daemon
4
#
5
# chkconfig: 2345 61 39
6
# description: Clam AntiVirus Daemon is a TCP/IP or socket protocol \
7
#              server.
8
# processname: clamd
9
# config: /etc/clamav.conf
10
 
11
# Source function library.
12
. /etc/rc.d/init.d/functions
13
 
14
# Source networking configuration.
15
. /etc/sysconfig/network
16
 
17
[ -x /usr/sbin/clamd ] || exit 0
18
 
19
# See how we were called.
20
case "$1" in
21
  start)
22
	echo -n "Starting Clam AntiVirus Daemon: "
171 - 23
	daemon /usr/sbin/clamd
163 - 24
	RETVAL=$?
25
	echo
26
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd
27
	;;
28
  stop)
29
	echo -n "Stopping Clam AntiVirus Daemon: "
30
	killproc clamd
31
	rm -f /var/clamav/clamd.socket
32
	rm -f /var/run/clamav/clamav.pid
33
	RETVAL=$?
34
	echo
35
### heres the fix... we gotta remove the stale files on restart
36
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamd
37
	;;
38
  status)
39
	status clamd
40
	RETVAL=$?
41
	;;
42
  restart|reload)
43
	$0 stop
44
	$0 start
45
	RETVAL=$?
46
	;;
47
  condrestart)
48
	[ -e /var/lock/subsys/clamd ] && restart
49
	RETVAL=$?
50
	;;
51
  *)
52
	echo "Usage: clamd {start|stop|status|restart|reload|condrestart}"
53
	exit 1
54
esac
55
 
56
exit $RETVAL
57