diff options
Diffstat (limited to 'security/amavisd-new/files/amavisd-snmp.in')
-rw-r--r-- | security/amavisd-new/files/amavisd-snmp.in | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/security/amavisd-new/files/amavisd-snmp.in b/security/amavisd-new/files/amavisd-snmp.in new file mode 100644 index 000000000000..0f724ae759f3 --- /dev/null +++ b/security/amavisd-new/files/amavisd-snmp.in @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: amavisd_snmp +# REQUIRE: snmpd +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable amavisd-snmp-subagent: +# +# amavisd_snmp_enable="YES" +# + +. /etc/rc.subr + +name=amavisd_snmp +rcvar=amavisd_snmp_enable + +command="%%PREFIX%%/sbin/amavisd-snmp-subagent" +command_interpreter="%%PERL%%" +pidfile="%%AMAVISDIR%%/amavisd-snmp.pid" + +# defaults +amavisd_snmp_enable=${amavisd_snmp_enable:-"NO"} +# amavis database directory +amavisd_snmp_dbdir=${amavisd_snmp_dbdir:-"%%AMAVISDIR%%/db"} +# log_level 0..5, default 0 +amavisd_snmp_loglevel=${amavisd_snmp_loglevel:-"0"} + +load_rc_config $name + +required_dirs=${amavisd_snmp_dbdir} +amavisd_snmp_flags="-D ${amavisd_snmp_dbdir} -d ${amavisd_snmp_loglevel} -P ${pidfile}" +run_rc_command "$1" |