/[smeserver]/rpms/clamav/sme9/clamav.init
ViewVC logotype

Contents of /rpms/clamav/sme9/clamav.init

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Fri May 24 16:20:30 2013 UTC (11 years, 6 months ago) by slords
Branch: MAIN
CVS Tags: clamav-0_98_1-1_el6_sme, clamav-0_99-1_el6_sme, clamav-0_98_5-1_el6_sme, clamav-0_97_7-1_el6_sme, clamav-0_97_7-1_rf, clamav-0_98_6-1_el6_sme, clamav-0_99_2-1_el6_sme, clamav-0_98_1-2_el6_sme, clamav-0_97_8-1_el6_sme, clamav-0_98_1-3_el6_sme, clamav-0_98_7-1_el6_sme, clamav-0_98_1-4_el6_sme, clamav-0_100_2-1_el6_sme, clamav-0_99_3-1_el6_sme, clamav-0_100_2-3_el6_sme, clamav-0_98_4-2_el6_sme, clamav-0_98_3-1, clamav-0_98_3-2_el6_sme, clamav-0_100_2-5_el6_sme, clamav-0_98_4-1, clamav-0_100_2-4_el6_sme, clamav-0_99_1-1_el6_sme, clamav-0_99-2_el6_sme, clamav-0_100_2-6_el6_sme, clamav-0_98_3-1_el6, clamav-0_99_4-1_el6_sme, HEAD
Initial import

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 # pidfile: /var/run/clamav/clamd.pid
10 # config: /etc/clamav.conf
11
12 # Source function library.
13 . /etc/rc.d/init.d/functions
14
15 # Source networking configuration.
16 . /etc/sysconfig/network
17
18 [ -x /usr/sbin/clamd ] || exit 0
19
20 start(){
21 echo -n "Starting Clam AntiVirus Daemon: "
22 daemon clamd
23 RETVAL=$?
24 echo
25 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd
26 return $RETVAL
27 }
28
29 stop() {
30 echo -n "Stopping Clam AntiVirus Daemon: "
31 killproc clamd
32 rm -f /var/clamav/clamd.socket
33 rm -f /var/run/clamav/clamav.pid
34 RETVAL=$?
35 echo
36 ### heres the fix... we gotta remove the stale files on restart
37 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamd
38 return $RETVAL
39 }
40
41 restart() {
42 stop
43 start
44 }
45
46 # See how we were called.
47 case "$1" in
48 start)
49 start
50 ;;
51 stop)
52 stop
53 ;;
54 status)
55 status clamd
56 RETVAL=$?
57 ;;
58 restart|reload)
59 restart
60 ;;
61 condrestart)
62 [ -e /var/lock/subsys/clamd ] && $0 restart
63 RETVAL=$?
64 ;;
65 *)
66 echo "Usage: clamd {start|stop|status|restart|reload|condrestart}"
67 exit 1
68 esac
69
70 exit $RETVAL
71

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed