git-svn: trunk@1223
Nigel Horne authored on 2004/12/30 23:05:071 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,47 @@ |
0 |
+#!/bin/sh |
|
1 |
+ |
|
2 |
+# Copyright (C) 2004 Nigel Horne <njh@bandsman.co.uk> |
|
3 |
+# |
|
4 |
+# This program is free software; you can redistribute it and/or modify |
|
5 |
+# it under the terms of the GNU General Public License as published by |
|
6 |
+# the Free Software Foundation; either version 2 of the License, or |
|
7 |
+# (at your option) any later version. |
|
8 |
+# |
|
9 |
+# This program is distributed in the hope that it will be useful, |
|
10 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
+# GNU General Public License for more details. |
|
13 |
+# |
|
14 |
+# You should have received a copy of the GNU General Public License |
|
15 |
+# along with this program; if not, write to the Free Software |
|
16 |
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|
17 |
+# |
|
18 |
+# Install into /etc/rc.d as /etc/rc.d/clamav |
|
19 |
+# chmod 755 /etc/rc.d/clamav |
|
20 |
+# |
|
21 |
+# Add lines such as this to /etc/rc.conf: |
|
22 |
+# clamd="YES" |
|
23 |
+# clamav_milter="YES" |
|
24 |
+# clamav_milter_flags="--max-children=2 --dont-wait --timeout=0 -P local:/var/run/clamav/clamav.sock --pidfile=/var/run/clamav/clamav-milter.pid --quarantine-dir=/var/run/clamav/quarantine" |
|
25 |
+# |
|
26 |
+# Tested with NetBSD 2.0 |
|
27 |
+ |
|
28 |
+# PROVIDE: clamav |
|
29 |
+# REQUIRE: NETWORKING |
|
30 |
+# KEYWORD: NetBSD |
|
31 |
+ |
|
32 |
+. /etc/rc.subr |
|
33 |
+ |
|
34 |
+name="clamd" |
|
35 |
+command="/usr/local/sbin/${name}" |
|
36 |
+ |
|
37 |
+load_rc_config $name |
|
38 |
+run_rc_command "$1" |
|
39 |
+ |
|
40 |
+name="clamav_milter" |
|
41 |
+command="/usr/local/sbin/clamav-milter" |
|
42 |
+ |
|
43 |
+load_rc_config $name |
|
44 |
+if [ $clamav_milter = YES ]; then |
|
45 |
+ run_rc_command "$1" |
|
46 |
+fi |