⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clamd

📁 最好的反病毒开放源代码。
💻
字号:
#! /bin/sh# v1.2 05-2004, martin fuxa, yeti@email.cz#### BEGIN INIT INFO# Provides:       clamd# Required-Start: # Required-Stop:  # Default-Start:  2 3 5# Default-Stop:   0 1 2 6# Description:    Control clamav daemon.### END INIT INFO#### HISTORY# 2004-05-27 ADD - FreshClam code# VariablesPID="/var/run/clamd.pid"SBIN="/usr/local/sbin/clamd"CONF="/etc/clamav.conf"WHAT="Clam AntiVirus"# START_FRESHCLAM value: 1=true, 0 falseSTART_FRESHCLAM=1FRESHCLAM_SBIN="/usr/local/bin/freshclam"FRESHCLAM_CONF="/etc/freshclam.conf"FRESHCLAM_WHAT="FreshClam"# Source SuSE config. /etc/rc.statustest -x $SBIN || exit 5test -e $CONF || exit 5if [ $START_FRESHCLAM = 1 ]then    test -x $FRESHCLAM_SBIN || exit 5    test -e $FRESHCLAM_CONF || exit 5fi# First reset status of this servicerc_reset# Process requestcase "$1" in    start)        if [ $START_FRESHCLAM = 1 ]        then            echo -n "Starting ${FRESHCLAM_WHAT} ${FRESHCLAM_CONF}"            startproc $FRESHCLAM_SBIN --daemon --config-file=${FRESHCLAM_CONF}            rc_status -v        fi        echo -n "Starting ${WHAT} ${CONF} "        ## Start daemon with startproc(8). If this fails        ## the echo return value is set appropriate.        startproc $SBIN $CONF        # Remember status and be verbose        rc_status -v        ## start freshclam            ;;    stop)        echo -n "Shutting down ${WHAT}"        ## Stop daemon with killproc(8) and if this fails        ## set echo the echo return value.        killproc -TERM $SBIN        # Remember status and be verbose        rc_status -v        if [ $START_FRESHCLAM = 1 ]        then            echo -n "Shutting down ${FRESHCLAM_WHAT}"            killproc -TERM $FRESHCLAM_SBIN            rc_status -v        fi    ;;    restart)        ## Stop the service and regardless of whether it was        ## running or not, start it again.        $0 stop        $0 start        # Remember status and be quiet        rc_status    ;;    status)        echo -n "Checking for ${WHAT} "        checkproc $SBIN        rc_status -v        if [ $START_FRESHCLAM = 1 ]        then            echo -n "Checking for ${FRESHCLAM_WHAT} "            checkproc $FRESHCLAM_SBIN            rc_status -v        fi    ;;    *)        echo "Usage: $0 {start|stop|status|restart}"        exit 1    ;;esacrc_exit### END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -