diff options
author | Eray Aslan <eras@gentoo.org> | 2013-04-01 12:51:55 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2013-04-01 12:51:55 +0000 |
commit | 90b806c8c95276bb6ccd664bacea032aa0cefb84 (patch) | |
tree | aa41379d055991930c6174148a3a1ea0678c8054 /app-antivirus/clamav | |
parent | Remove old. (diff) | |
download | historical-90b806c8c95276bb6ccd664bacea032aa0cefb84.tar.gz historical-90b806c8c95276bb6ccd664bacea032aa0cefb84.tar.bz2 historical-90b806c8c95276bb6ccd664bacea032aa0cefb84.zip |
Hopefully fix log file permission - bug #463208
Package-Manager: portage-2.2.0_alpha170/cvs/Linux x86_64
Manifest-Sign-Key: 0x77F1F175586A3B1F
Diffstat (limited to 'app-antivirus/clamav')
-rw-r--r-- | app-antivirus/clamav/ChangeLog | 8 | ||||
-rw-r--r-- | app-antivirus/clamav/Manifest | 30 | ||||
-rw-r--r-- | app-antivirus/clamav/clamav-0.97.7-r2.ebuild | 123 | ||||
-rwxr-xr-x | app-antivirus/clamav/files/clamd.initd-r5 | 123 |
4 files changed, 269 insertions, 15 deletions
diff --git a/app-antivirus/clamav/ChangeLog b/app-antivirus/clamav/ChangeLog index 37c5c49a03c8..5d2ff5d5b443 100644 --- a/app-antivirus/clamav/ChangeLog +++ b/app-antivirus/clamav/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-antivirus/clamav # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.451 2013/03/27 08:52:03 eras Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.452 2013/04/01 12:51:53 eras Exp $ + +*clamav-0.97.7-r2 (01 Apr 2013) + + 01 Apr 2013; Eray Aslan <eras@gentoo.org> +clamav-0.97.7-r2.ebuild, + +files/clamd.initd-r5: + Hopefully fix log file permission - bug #463208 27 Mar 2013; Eray Aslan <eras@gentoo.org> files/clamd.initd-r4: Populate variables at the top diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest index 152242a2f06a..7efdd14aca8d 100644 --- a/app-antivirus/clamav/Manifest +++ b/app-antivirus/clamav/Manifest @@ -10,6 +10,7 @@ AUX clamd.initd-r1 3005 SHA256 b4c0f380a8138b93becf9d33d50047f8ef4c165e64a8e5b15 AUX clamd.initd-r2 3021 SHA256 d7f67aa61f8a93b5f94828b3f3f0c345ed9881a0550cb151274f42f81ce1b59e SHA512 095519b09ee617d587488f32e665f37e052e490913929027c3913a776fe3becdc6f4ee246d24b7494cc9bae65dc6ea2772c6199859d8ac22b1baf64969eb9eab WHIRLPOOL b6ff853682b4678667459ba8d6b95ddb7bc811de4e9a41ff5d6b84f986a12231fd2cbaf42f5e4e82cece335966d25165b4b05df3a4ea5cdbda43eefc1a4fe1be AUX clamd.initd-r3 3118 SHA256 68bfcbd582667c719b81a7f0c396de9733bc5efefa4e7b8dd3fc0c02dfcea887 SHA512 9a173f4eef3ef173b6267a7753acd221773ad22fc2b689e8e842783ea787a18ee5990607ebd434a0ad9e45a0347ad8f7ba40935456e4f336cf2b3dcbc09c9f46 WHIRLPOOL d5cd66a07937af859307ca5b22012c33dc3a2c767d42244e9cd5b28a13c235340d604d10baf30f134a74965ba4bec552b943fc659e90952d650387a867633f18 AUX clamd.initd-r4 3100 SHA256 efd8e7f2f95a6e1c14e6e40fdb27bb6de5f3cc465a7582f7fcee7a883388c11f SHA512 f86a2a278711dbcf4160322be4d7e5beb35671e09bdde8497248ab856c77004b50c07ee86d94cfb6e50fe149aee1db09e6328f5a70eb3feadd60921ba4792e4c WHIRLPOOL c749f3e42419024316d4aae1e7256a2f41e8e8a1a537d81258a4ccae6cf3fa08e966a47eaed8aa581a54e49228c125695b5ac7651e3a74bf8ac2cb8b351d5fb2 +AUX clamd.initd-r5 3152 SHA256 194758100f58482fd45a46bd2f14ed13b1a84eaee7032795d7eca0508c588e4a SHA512 ee4d33df87df265fbaaa6b32f29d96924e8e8531b76199450df8ae114397e8f6a04d77fd4457751e4ecba4d911c33b6220e70654c006aa94a56cd43c44e647e4 WHIRLPOOL dd48d464c8c2c3cdabb53451bbff02e30c1da1f68bf672a3dbc20dfcae57e2fb291f50d5ef6b2f0587ac3374134856273bb19e704b0b1640c701eeb5f3ec6c4e DIST clamav-0.97.5.tar.gz 14754465 SHA256 db6c5e1a5ec8ca0b8006cf82661d3158d3365ba1b4bc14c03c5d0bca89a93c0d SHA512 618ef2f1d256f2e3cd76beaf92b76d9df0963d449c2d80885ed6039f4edd59ddf9a73ebe0b93549c62264d7df4ac918d306d631f8c0b1df8e47a7e763550f1cc WHIRLPOOL 7d148323a4510acfe706a17f27c12bd808a013aa91807257b03af83e4a6daeb619962243689eee5614ce2922dfa39d21ae357d2509617be4642f162ac91d5d7e DIST clamav-0.97.6.tar.gz 14765896 SHA256 a15a2bb9200ac9f2c6f1c5e1072ac265a2c4fe5a9be4663b47d076afdfa123f8 SHA512 f897f4c70c7555d1ede480b089f73020501bceb1d5de568785b842d04f35ee0771213b8050ac6159dde1f19816ab9a8373e8bcb419106eeeb701a386932d96e7 WHIRLPOOL 1a4916592843a3568ebef78663f76e8eba96b7d561bd61199ad1e15b239fc4c2bb3c25dcc49fad713cd09fb221ab83e9e7b1ba923ed71220943eec78dc04fb16 DIST clamav-0.97.7.tar.gz 14598481 SHA256 8527754e7eb235317e37a50706d94d3fc9d880fd0bf6f3cb83757d64a720e9ff SHA512 92120250afb882b7fb9f956f2095797f8e3c93076a229967123261c907d9b4436cda6cf2d18b2c61cec8b33afeacba9c2701ad3322aa3316163fe4f36f7a7bc7 WHIRLPOOL 1f3fb155ad4e35ef1ea3835941e40363f9da9c37ab46fe1b9d44e29add6fee9d775e1f5858648a6229f9d0f41c40ed4ade726a4fc044156d208bf10f6cc8c705 @@ -19,23 +20,24 @@ EBUILD clamav-0.97.6-r2.ebuild 3803 SHA256 353440155e0eae9939f9bc838406b7e57dcdb EBUILD clamav-0.97.6-r3.ebuild 3812 SHA256 eac8b54c1410560e9a463bdb183235bc4008a0f79705b8c53762cf1eda9e7d06 SHA512 9045c26a2feceb9c5527784334ce26ac332dde74f3ec8d018676bea20e0548c6257d57b27ac7e1b4e09f14b7eb6ad45eeffbbc00dee3432268c30d9a857611a5 WHIRLPOOL 73ce429ff0fe71ca8e6a5a07ca6ceee631ddc6fdd865b7ec2d15bbadd14e8927a6a51be8ebd065faecfededa3fbef1c257a5ccd2ea7a11d9a4609713f69c8313 EBUILD clamav-0.97.6.ebuild 3822 SHA256 29cf66c65d5aae9d8c0c56a9148e6e7c68e287a6dd4debaa5a9dc8393bf1b9b9 SHA512 f07cfc81bcc769499583ace5a712ca0aa7b3d3ae8edef4707774bf647ba4708c4bcebc191dd71fe62e19736dc8df28568a96403f833ad50b4a65b6af7e6298ef WHIRLPOOL 76e9cbd0728111366181573d6d4e78535a77141fd813940cb4228715861ff540141cfdcc2c3bb007a505e1856c5768dad0997ee6816e7df87ea23d832eec6135 EBUILD clamav-0.97.7-r1.ebuild 3812 SHA256 2fdb27893f603d3e342b16f49b2ed7283336db69c29c98697e37d93f870bb2fd SHA512 73e41a379c9c06af6aa9d920094a12421eaa310a5aed0b8095606c060ead1092b8bdebf9b1946270656e2e27c341ce644f8693897c243f89becbdf69a552f176 WHIRLPOOL 590c84d7dcdaa32e610464209ef5e898046a07aff190704d5fa0a67a40358365eb27ab253b43fc25847d01d7ff91724ec1ce00a55549885a9742f6c2ac762e46 +EBUILD clamav-0.97.7-r2.ebuild 3812 SHA256 a58c4ecb5b2e898be774a2e3ace4e095df1d3495ef9efb676c291633a7c9bf60 SHA512 ab79f4daab249e5463df551b33c2b11d3091672c07ef2bc97eac80e0c81daab6f70362c93f5302975f605e560241b64c164ee83b3401e8dc9c29518b6832a0f2 WHIRLPOOL 0a4fb1bf9185be9ec9b569ae88a9c4b1d7a55c2d75b7b695472cde9d69797e637490ed1cbf7984afc9ad8292c80ebbf138859557e07f8dab153678e02d9cb72c EBUILD clamav-0.97.7.ebuild 3802 SHA256 043e4b678085adc80cea6b451ad1fde7428388a781a5562d3b6a38495737351b SHA512 5b66419616a1655cecf1d32d70e8fcb3198594e818e0695a22dd80ff398ea199d89be12328f5948c7a8c94bbaa92298a2342944a6b6b740f5bf0f9bd5a1ad39e WHIRLPOOL ade0ee79f4b4c5533b6755614f130efb282640cdc07607e08146d5708461af08aa86d81f48b5d337b7c1a1139383b1decf87f7898d0549f9ff871e860268916a -MISC ChangeLog 65603 SHA256 299db7eff224930e3fd75432f94046d4269c04e71ad4c3def4030bc130374821 SHA512 147726d36a65ea2d4773cc360668419bc00891e3811f476832b04c23506e611166597b515d0540ca7bd70aaf7d0270ba51ce803d52e7ed60616d53d44e1cfbac WHIRLPOOL 67b6cd5225a50da1badc3deb9760cc35a48f42f372282a672d664af582c0d697c76bc2d9556ac73b54028aca873c38cc97ee12f5952f2649afb12a273c12e485 +MISC ChangeLog 65782 SHA256 6df20f3aebc2832512758fb69709ece487430abd404d50d2dde6cc5589384f38 SHA512 d458f560e75f3b361abcac156ad93d35fe2791c1524c9b11bb6a963c0803bb7aaf8889203ab2198d7b50232808a0d6de183f417a0be00729b8ba2e04ef47fcb7 WHIRLPOOL 00a5bdeef480b8eb1880be3f091902deac260baf84bc3b0d8693a351961e1b889359a9da558584e1629862b8a5d0c4cfe63a372bafbd0c96fa90d19c2cd99ce8 MISC metadata.xml 320 SHA256 e2a8c4c8bedbffe50a126c1c7395a4d92652c2d95347b9496d54aea1f230a22d SHA512 c5bb20c993b91112d9c9e0b7bb6c116ac7f711c769084eaaacc28bc7eeb54db09c9794c6ef057747d80a08cf1502f0f688cdefc741423a38da55b2deaebd6476 WHIRLPOOL 741ff80258dee2c145d08f72f10982bd5c1fcba44ed84054cd1a33787864a7d8821b432c3246ad5a04ce11edde7d045f3eb6e056200e3bd2e8505eeea3d7277d -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQIcBAEBCAAGBQJRUrM1AAoJEHfx8XVYajsfgakP+QEjoZDPadfdQ4a3ggAmf/CU -e4F815+CSyFJ9AQQth1P88L2m0gmlFOaq4q3rcTSXpiS/ewFatvq3xKeVM2isaWs -aQW1Qssf3m6AGoVOVjLp7Wi/1WFZ9iokpR9qW5C9GooRndRswMftZ+Wlyf5Ftiz1 -mwimKpuUUVhL9w7iQxkTYlP7p7hQeRqe3fyzQ4jhwh2REiFgPX60gsdO6QsRMtv0 -6S6kr7W0LZ6K9Nt11yAyikcEKD443St3QD9ghFXhIqEjgo4ajd4CUF/5mO1l5/5F -aDe4cetMPa2eRKTDwzq+me2jltBoNhS9Ji5N6NHk1gsRNQjTCvQJiabHv9zT6qyM -AUGOYmFwce+aCkZVX2ESfH8QO7QHhGBzTbrlYbt4wgWbXoHDlQ3pvFAbwnqoTO08 -ZrLjUuroVXXEok55EOFPLNoQ/SDH2tAeHmLDFxyzqQEq7AhK0wH/O4Kvvjr70CYo -WzP22oQcM457UUjE5Dq/ontFd17ahWN/n1HZsxu0KU9XPk0R9HmV0IFZTqWWVsJH -y1MpvNSQkPW3d2PVSS3M7F0JvgHXZapHdVe6tp9Pxtb5h2EoyCdqx8pK2LByzFQV -tTDya7S+8FFRV65upGsVJZHh0HfCRz28kguZbvNutlCxjl46hOX5A9xqncpUVuXY -/2SVjKu0gqLIYAE8zfFE -=xa/b +iQIcBAEBCAAGBQJRWYLrAAoJEHfx8XVYajsf/m4QALZvBKFLqOjM1gO1XMId+G9P +HGmXo+uLWSqMddrUXQu5wDEwP49q6U4SNKqyI/4/n7Nj1Wjnt1HLbjHiK2ONxM7t +/zIZQ76UrYGP45UMg3lvJB5cu0HPMAE9sxprvci/l0/Ml5pZVT3CCW/Y62sotad4 +BDZUManvfTZI+G8sscIvAu0heIXrGwc7bcI1ZTvw3uz/Tz1nohdwTZuN05bngEgD +5JVVeUwLOO2p0WI6VifUZ8lDsdaTgD8WvHWr4qFcvnHsRH+gzS2jtvSOSu+y47yg +WMvpMX7jPk4ti1/UPjEegZdy1aXudH8DTlfIZVmsdvHjISLBa1hClE021fectk/O +HoJZXMS+6R2352lu/H4Q3WTmMMLbU6c/3PdLLbPnslr+mXdZLmlt2Mw1HlrOerEY +90vtFUCn6TnG2iha/nGkURsJL9EhQUhclaR3NEJT8RdDNujFoCo8/d/GHxQfQdS4 +ZUMG3ixCJOwchpzbQ5jIk77LaMaS8LevhIg5lAUI5ohi3jxfya0mvsE9f4pwOoH0 +QXOFLACdztjM7xWWKD2abBo0o9kxgtI571Mt6pk6W59ZlEqoJ/DKghLL6Ii7eyW4 +kD7GuAZPbZiyL5f3dAOwSL/TT6Pa70SfuDTai9gfMm8zKWvELVeT/HMVHBPg20cr +/P9xExH8NIIJepw5iGIV +=YNCS -----END PGP SIGNATURE----- diff --git a/app-antivirus/clamav/clamav-0.97.7-r2.ebuild b/app-antivirus/clamav/clamav-0.97.7-r2.ebuild new file mode 100644 index 000000000000..c5c2e32e58d3 --- /dev/null +++ b/app-antivirus/clamav/clamav-0.97.7-r2.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.97.7-r2.ebuild,v 1.1 2013/04/01 12:51:53 eras Exp $ + +EAPI=5 + +inherit eutils flag-o-matic user + +DESCRIPTION="Clam Anti-Virus Scanner" +HOMEPAGE="http://www.clamav.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="bzip2 clamdtop iconv ipv6 milter selinux static-libs uclibc" + +CDEPEND="bzip2? ( app-arch/bzip2 ) + clamdtop? ( sys-libs/ncurses ) + iconv? ( virtual/libiconv ) + milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) ) + dev-libs/libtommath + >=sys-libs/zlib-1.2.2 + sys-devel/libtool" +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-clamav )" + +RESTRICT="test" + +DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.97-nls.patch +) + +pkg_setup() { + enewgroup clamav + enewuser clamav -1 -1 /dev/null clamav +} + +src_prepare() { + use ppc64 && append-flags -mminimal-toic + use uclibc && export ac_cv_type_error_t=yes +} + +src_configure() { + econf \ + --disable-experimental \ + --enable-id-check \ + --with-dbdir="${EPREFIX}"/var/lib/clamav \ + --with-system-tommath \ + --with-zlib="${EPREFIX}"/usr \ + $(use_enable bzip2) \ + $(use_enable clamdtop) \ + $(use_enable ipv6) \ + $(use_enable milter) \ + $(use_enable static-libs static) \ + $(use_with iconv) +} + +src_install() { + default + + rm -rf "${ED}"/var/lib/clamav + newinitd "${FILESDIR}"/clamd.initd-r5 clamd + newconfd "${FILESDIR}"/clamd.conf clamd + + keepdir /var/lib/clamav + fowners clamav:clamav /var/lib/clamav + keepdir /var/log/clamav + fowners clamav:clamav /var/log/clamav + + dodir /etc/logrotate.d + insinto /etc/logrotate.d + newins "${FILESDIR}"/clamav.logrotate clamav + + # Modify /etc/{clamd,freshclam}.conf to be usable out of the box + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \ + -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \ + -e "s:.*\(User\) .*:\1 clamav:" \ + -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \ + -e "s:^\#\(LogTime\).*:\1 yes:" \ + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ + "${ED}"/etc/clamd.conf + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \ + -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \ + -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \ + -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \ + -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \ + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ + "${ED}"/etc/freshclam.conf + + if use milter ; then + # MilterSocket one to include ' /' because there is a 2nd line for + # inet: which we want to leave + dodoc "${FILESDIR}"/clamav-milter.README.gentoo + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \ + -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \ + -e "s:.*\(User\) .*:\1 clamav:" \ + -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \ + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ + -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \ + "${ED}"/etc/clamav-milter.conf + cat > "${ED}"/etc/conf.d/clamd <<-EOF + MILTER_NICELEVEL=19 + START_MILTER=no + EOF + fi + + prune_libtool_files --all +} + +pkg_postinst() { + if use milter ; then + elog "For simple instructions how to setup the clamav-milter read the" + elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}" + fi +} diff --git a/app-antivirus/clamav/files/clamd.initd-r5 b/app-antivirus/clamav/files/clamd.initd-r5 new file mode 100755 index 000000000000..52edcf0dfc7b --- /dev/null +++ b/app-antivirus/clamav/files/clamd.initd-r5 @@ -0,0 +1,123 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.initd-r5,v 1.1 2013/04/01 12:51:53 eras Exp $ + +daemon_clamd="/usr/sbin/clamd" +daemon_freshclam="/usr/bin/freshclam" +daemon_milter="/usr/sbin/clamav-milter" + +extra_commands="logfix" + +depend() { + use net + provide antivirus +} + +get_config() { + clamconf | sed 's/["=]//g' | \ + awk "{ + if(\$0==\"Config file: $1.conf\") S=1 + if(S==1&&\$0==\"\") { + print \"$3\" + exit + } + if(S==1&&\$1~\"^$2\$\") { + print \$2!=\"disabled\"?\$2:\"$3\" + exit + } + }" +} + +start() { + # populate variables and fix log file permissions + logfix + + if [ "${START_CLAMD}" = "yes" ]; then + checkpath --quiet --mode 755 \ + --owner "${clamd_user}":"${clamd_user}" \ + --directory `dirname ${clamd_socket}` + if [ -S "${clamd_socket}" ]; then + rm -f ${clamd_socket} + fi + ebegin "Starting clamd" + start-stop-daemon --start --quiet \ + --nicelevel ${CLAMD_NICELEVEL:-0} \ + --exec ${daemon_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 ${daemon_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 ${daemon_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() { + clamd_socket=$(get_config clamd LocalSocket /var/run/clamav/clamd.sock) + clamd_user=$(get_config clamd User clamav) + freshclam_user=$(get_config freshclam DatabaseOwner clamav) + + if [ "${START_CLAMD}" = "yes" ]; then + # fix clamd log permissions + # (might be clobbered by logrotate or something) + local logfile=$(get_config clamd LogFile) + if [ -n "${logfile}" ]; then + checkpath --quiet \ + --owner "${clamd_user}":"${clamd_user}" \ + --mode 640 \ + --file ${logfile} + fi + fi + + if [ "${START_FRESHCLAM}" = "yes" ]; then + # fix freshclam log permissions + # (might be clobbered by logrotate or something) + local logfile=$(get_config freshclam UpdateLogFile) + if [ -n "${logfile}" ]; then + checkpath --quiet \ + --owner "${freshclam_user}":"${freshclam_user}" \ + --mode 640 \ + --file ${logfile} + fi + fi +} |