#!/bin/sh
# File: pop-before-smtp.sh
# Date: Fri Mar 7 11:20:43 2003
# Time-stamp: <2006-03-17 15:29:06 ericx>
# Description: start/stop script for pop-before-smtp daemon
#
# $FreeBSD: ports/mail/pop-before-smtp/files/pop-before-smtp.sh.in,v 1.2 2006/03/21 20:23:15 mnag Exp $
# PROVIDE: pop-before-smtp
# REQUIRE: DAEMON
# BEFORE: mail
# KEYWORD: shutdown
#
# PLEASE note the distinction between dashes [-] and underscores [_]...
#
# The following pop_before_smtp_* variables may be defined in
# /etc/rc.conf or /etc/rc.conf.d/pop_before_smtp
#
# pop_before_smtp_enable - Set to YES to enable pop-before-smtp
# Default: no
#
# pop_before_smtp_program - Path to pop-before-smtp program
# Default: ${PREFIX}/sbin/pop-before-smtp
#
# pop_before_smtp_config - Path to pop-before-smtp configuration
# Default:
# ${PREFIX}/etc/pop-before-smtp-conf.pl
#
# pop_before_smtp_flags - Flags to pop-before-smtp program
# Default: [none]
#
# pop_before_smtp_pid - Path to pop-before-smtp pid file
# Default: /var/run/pop-before-smtp.pid
#
. /etc/rc.subr
# sh interprets dash chars as the numeric minus operator...
name="pop_before_smtp"
filename="pop-before-smtp"
rcvar=`set_rcvar`
load_rc_config $name
command=${pop_before_smtp_program:-"/usr/local/sbin/${filename}"}
pidfile=${pop_before_smtp_pid:-"/var/run/${filename}.pid"}
config=${pop_before_smtp_config:-"/usr/local/etc/${filename}-conf.pl"}
command_args="--config=${config}"
command_args="${command_args} ${pop_before_smtp_flags:-''}"
command_args="${command_args} --daemon=${pidfile}"
command_interpreter=/usr/local/bin/perl
required_files=${config}
run_rc_command "$1"
syntax highlighted by Code2HTML, v. 0.9.1