Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 243843 Details for
Bug 333783
app-antivirus/clamav-0.96.1 fails to start when /var/run/clamav does not exist
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
clamd.rc
clamd.rc (text/plain), 3.46 KB, created by
Eray Aslan
on 2010-08-21 12:13:24 UTC
(
hide
)
Description:
clamd.rc
Filename:
MIME Type:
Creator:
Eray Aslan
Created:
2010-08-21 12:13:24 UTC
Size:
3.46 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2010 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > >opts="logfix" > >depend() { > use net > provide antivirus >} > >start() { > local clamd_socket=`awk '$1 == "LocalSocket" { print $2 }' /etc/clamd.conf` > > logfix > > if [ "${START_CLAMD}" = "yes" ]; then > if [ -S "${clamd_socket:-/tmp/clamd}" ]; then > rm -f ${clamd_socket:-/tmp/clamd} > fi > ebegin "Starting clamd" > start-stop-daemon --start --quiet \ > --nicelevel ${CLAMD_NICELEVEL:-0} \ > --exec /usr/sbin/clamd > eend $? "Failed to start clamd" > fi > > if [ "${START_FRESHCLAM}" = "yes" ]; then > ebegin "Starting freshclam" > start-stop-daemon --start --quiet \ > --nicelevel ${FRESHCLAM_NICELEVEL:-0} \ > --exec /usr/bin/freshclam -- -d > retcode=$? > if [ ${retcode} = 1 ]; then > eend 0 > einfo "Virus databases are already up to date." > else > eend ${retcode} "Failed to start freshclam" > fi > fi > > if [ "${START_MILTER}" = "yes" ]; then > if [ -z "${MILTER_CONF_FILE}" ]; then > MILTER_CONF_FILE="/etc/clamav-milter.conf" > fi > > ebegin "Starting clamav-milter" > start-stop-daemon --start --quiet \ > --nicelevel ${MILTER_NICELEVEL:-0} \ > --exec /usr/sbin/clamav-milter -- -c ${MILTER_CONF_FILE} > eend $? "Failed to start clamav-milter" > fi >} > >stop() { > if [ "${START_CLAMD}" = "yes" ]; then > ebegin "Stopping clamd" > start-stop-daemon --stop --quiet --name clamd > eend $? "Failed to stop clamd" > fi > if [ "${START_FRESHCLAM}" = "yes" ]; then > ebegin "Stopping freshclam" > start-stop-daemon --stop --quiet --name freshclam > eend $? "Failed to stop freshclam" > fi > if [ "${START_MILTER}" = "yes" ]; then > ebegin "Stopping clamav-milter" > start-stop-daemon --stop --quiet --name clamav-milter > eend $? "Failed to stop clamav-milter" > fi >} > >logfix() { > if [ "${START_CLAMD}" = "yes" ]; then > # fix clamd log permissions > # (might be clobbered by logrotate or something) > local logfile=`awk '$1 == "LogFile" { print $2 }' /etc/clamd.conf` > local clamav_user=`awk '$1 == "User" { print $2 }' /etc/clamd.conf` > local clamav_basedir=$(awk '$1 == "PidFile" { print $2 }' /etc/clamd.conf | sed s:/[^/]*$::) > clamav_basedir="${clamav_basedir:-/var/run/clamav}" > clamd_socketdir="${clamd_socket%/*}" > clamd_socketdir="${clamd_socketdir:-/var/run/clamav}" > if [ -n "${logfile}" ] && [ -n "${clamav_user}" ]; then > if [ ! -f "${logfile}" ]; then > touch ${logfile} > fi > chown ${clamav_user} ${logfile} > chmod 640 ${logfile} > fi > if [ ! -d "${clamav_basedir}" ]; then > checkpath -q -d -o "${clamav_user}:${clamav_user}" -m 0755 "${clamav_basedir}" > fi > if [ ! -d "${clamd_socketdir}" ]; then > checkpath -q -d -o "${clamav_user}:${clamav_user}" -m 0755 "${clamd_socketdir}" > fi > fi > > if [ "${START_FRESHCLAM}" = "yes" ]; then > # fix freshclam log permissions > # (might be clobbered by logrotate or something) > logfile=`awk '$1 == "UpdateLogFile" { print $2 }' /etc/freshclam.conf` > local freshclam_user=`awk '$1 == "DatabaseOwner" { print $2 }' /etc/freshclam.conf` > local freshclam_basedir=$(awk '$1 == "PidFile" { print $2 }' /etc/freshclam.conf | sed s:/[^/]*$::) > freshclam_basedir="${freshclam_basedir:-/var/run/clamav}" > if [ -n "${logfile}" -a -n "${clamav_user}" ]; then > if [ ! -f "${logfile}" ]; then > touch ${logfile} > fi > chown ${freshclam_user} ${logfile} > chmod 640 ${logfile} > fi > if [ ! -d "${freshclam_basedir}" ]; then > checkpath -q -d -o "${freshclam_user}:${freshclam_user}" -m 0755 "${freshclam_basedir}" > fi > fi >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 333783
:
243843
|
244543
|
317113
|
320704