#!/bin/sh

# PROVIDE: imapproxyd
# REQUIRE: DAEMON courier_imap_imapd courier_imap_imapd_ssl cyrus_imapd dovecot inetd
# KEYWORD: shutdown

#
# Add the following line to /etc/rc.conf to enable imapproxyd:
#
# imapproxyd_enable (bool):	Set "YES" to enable imapproxyd
#				Default is "NO"
# imapproxyd_conf (file):	Set location of conf file.
#				Default is "/usr/local/etc/imapproxyd.conf"

. /etc/rc.subr

name=imapproxyd
rcvar=imapproxyd_enable

load_rc_config $name

: ${imapproxyd_enable="NO"}
: ${imapproxyd_conf="/usr/local/etc/imapproxyd.conf"}

command=/usr/local/sbin/in.imapproxyd
required_files="${imapproxyd_conf}"

run_rc_command "$1"
