#!/bin/sh
#
# $FreeBSD: ports/mail/synonym/files/synonym.sh.in,v 1.2 2006/02/20 20:47:15 dougb Exp $
#
# PROVIDE: synonym
# REQUIRE: DAEMON
# BEFORE: mail
# KEYWORD: shutdown
#
# Define these synonym_* variables in one of these files:
#       /etc/rc.conf
#       /etc/rc.conf.local
#       /etc/rc.conf.d/synonym
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
synonym_enable=${synonym_enable-"NO"}
synonym_pidfile=${synonym_pidfile-"/var/run/synonym/synonym.pid"}
synonym_conffile=${synonym_conffile-"/usr/local/etc/synonym.conf"}

. /etc/rc.subr

name=synonym
rcvar=`set_rcvar`
command=/usr/local/sbin/${name}

load_rc_config ${name}

case "${synonym_flags}" in
*-c\ *)
	echo "Warning: \$synonym_flags includes -c option." \
		"Please use \$synonym_conffile instead."
        ;;
*)
	synonym_flags="-c ${synonym_conffile} ${synonym_flags:--d}" ;;
esac

pidfile=${synonym_pidfile}
required_files=${synonym_conffile}

run_rc_command "$1"


syntax highlighted by Code2HTML, v. 0.9.1