Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
#! /bin/bash # # crond Start/Stop the clam antivirus daemon. # # chkconfig: 2345 70 41 # description: clamd is a standard Linux/UNIX program that scans for Viruses. # processname: clamd # config: /etc/clamd.conf # pidfile: /var/lock/subsys/clamd # Source function library. . /etc/init.d/functions RETVAL=0 # See how we were called. prog="clamd" progdir="/usr/sbin" # Source configuration if [ -f /etc/sysconfig/$prog ] ; then . /etc/sysconfig/$prog fi start() { PATH="${progdir}:$PATH" echo -n $"Starting $prog: " #ulimit -f 20000 LANG= daemon $prog RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd return $RETVAL } stop() { echo -n $"Stopping $prog: " # Would be better to send QUIT first, then killproc if that fails killproc $prog RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamd return $RETVAL } rhstatus() { status clamd } restart() { stop start } reload() { echo -n $"Reloading clam daemon configuration: " killproc clamd -HUP retval=$? echo return $RETVAL } reloaddb() { echo -n $"Reloading AV database: " killproc clamd -USR2 RETVAL=$? echo return $RETVAL } case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) reloaddb reload ;; reloaddb) reloaddb ;; status) rhstatus ;; condrestart) [ -f /var/lock/subsys/clamd ] && restart || : ;; *) echo $"Usage: $0 {start|stop|status|reload|reloaddb|restart|condrestart}" exit 1 esac exit $?