freebsd-ports/security/amavisd-new/files/amavisd-snmp.in
Chris Rees 09a8c4aa8c RC fixes;
- Use REQUIRE in lieu of BEFORE where possible
- Include KEYWORD: shutdown for persistent services
- load_rc_config should precede any default settings
- Style fixes, indenting functions, remove single-line functions

Approved by:	gabor (maintainer)
Feature safe:	yes
2012-10-28 13:57:12 +00:00

34 lines
697 B
Bash

#!/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
load_rc_config $name
# defaults
: ${amavisd_snmp_enable:=NO}
: ${amavisd_snmp_dbdir=%%AMAVISDIR%%/db}
# log_level 0..5, default 0
: ${amavisd_snmp_loglevel=0}
command=%%PREFIX%%/sbin/amavisd-snmp-subagent
command_interpreter=%%PERL%%
pidfile=${amavisd_pidfile:-%%AMAVISDIR%%/amavisd-snmp.pid}
required_dirs=${amavisd_snmp_dbdir}
amavisd_snmp_flags="-D ${amavisd_snmp_dbdir} -d ${amavisd_snmp_loglevel} -P ${pidfile}"
run_rc_command $1