#!/bin/sh

# PROVIDE: archivesmtp
# BEFORE: mail

. /etc/rc.subr

name="archivesmtp"
rcvar=archivesmtp_enable

command="/usr/local/sbin/${name}"

# Read settings and set defaults
load_rc_config "$name"

: ${archivesmtp_enable="NO"}
: ${archivesmtp_chuser="nobody"}
: ${archivesmtp_socket="unix:/var/run/archivesmtp/mta.sock"}
: ${archivesmtp_config="/usr/local/etc/archivesmtp.conf"}
: ${archivesmtp_pidfile="/var/run/archivesmtp/run.pid"}

pidfile="${archivesmtp_pidfile}"

command_args="${archivesmtp_flags} -p ${archivesmtp_socket} -f ${archivesmtp_config} -u ${archivesmtp_chuser} -r ${archivesmtp_pidfile} &"

run_rc_command "$1"
