--- etc/init.d/drwebd.orig 2006-03-07 15:41:12.000000000 +0100 +++ etc/init.d/drwebd 2006-06-09 23:59:38.000000000 +0200 @@ -1,40 +1,36 @@ -#!/bin/sh -# -# Dr.Web (R) init script -# $Revision: 1.5 $ -# +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ -BIN="drwebd" -PROGRAM="/opt/drweb/$BIN" -PIDFILE="/var/drweb/run/drwebd.pid" +PID=/var/drweb/run/drwebd.pid +SCVNAME="DrWeb daemon" -case "$1" in - stop) - echo -n "Shutting down Dr. Web daemon..." - if [ -f $PIDFILE ] ; then - kill `head -1 $PIDFILE` - fi - ;; - reload) - echo -n "Reloading Dr. Web daemon..." - if [ -f $PIDFILE ] ; then - kill -HUP `head -1 $PIDFILE` - fi - ;; - restart) - echo -n "Restarting Dr. Web daemon..." - if [ -f $PIDFILE ] ; then - kill `head -1 $PIDFILE` - fi - sleep 3 - $PROGRAM - ;; - start) - echo -n "Starting Dr. Web daemon..." - $PROGRAM - ;; - *) - echo $0: 'start|stop|restart|reload' - ;; -esac +depend() { + need net +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --quiet --start --pidfile ${PID} --exec /opt/drweb/drwebd + eend $? "Failed to start ${SVCNAME}" +} +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --quiet --stop --pidfile ${PID} + eend $? "Failed to stop ${SVCNAME}" +} + +reload() { + ebegin "Reloading ${SVCNAME} ..." + if [[ -f ${PID} ]] ; then + kill -HUP `head -1 ${PID}` + fi + eend $? + +restart() { + svc_stop + sleep 2 + svc_start +} --- etc/drweb/drweb-log 1970-01-01 01:00:00.000000000 +0100 +++ etc/drweb/drweb-log 2006-06-09 23:59:38.000000000 +0200 @@ -0,0 +1,11 @@ +/var/log/drweb/*.log { + rotate 4 + monthly + missingok + notifempty + compress + postrotate + /etc/init.d/syslog-ng reload > /dev/null 2>&1 || true + /etc/init.d/drweb restart > /dev/null 2>&1 || true + endscript +} --- etc/drweb/drweb32.ini.orig 2006-03-07 15:41:12.000000000 +0100 +++ etc/drweb/drweb32.ini 2006-06-10 00:07:36.000000000 +0200 @@ -32,7 +32,7 @@ ; This path is used by the antivirus engine for creating temporary files. ; /tmp would be used if TempPath is not defined. ; Normally, the daemon attempts to avoid using TempPath. -TempPath = "/var/drweb/spool" +TempPath = "/var/spool/drweb" ;LngFileName = { path to the language resource file, usual extension - dwl } ; Localization file location. @@ -228,7 +228,7 @@ ;LogFileName = "syslog" ;SyslogFacility = "Daemon" ;SyslogPriority = "Info" -LogFileName = "/var/drweb/log/drwebd.log" +LogFileName = "/var/log/drweb/drwebd.log" ;LimitLog = { Yes | No } ; Enable/Disable limit for log file size. Parameter @@ -611,7 +611,7 @@ ;LogFileName = "syslog" ;SyslogFacility = "Daemon" ;SyslogPriority = "Info" -LogFileName = "/var/drweb/log/drweb.log" +LogFileName = "/var/log/drweb/drweb.log" ;LimitLog = { Yes | No } ; Enable/Disable limit for log file size. Parameter