#!/bin/sh
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
    set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides:          mailcatcherd
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: catch email and serve via HTTP
# Description:       Debian init script to start the mailcatcher service.
#                    MailCatcher runs a super simple SMTP server which catches
#                    any message sent to it and displays it in a web interface.
### END INIT INFO
NAME="mailcatcher"
DAEMON="/usr/bin/${NAME}"
DESC="SMTP server that catches and displays email in a web interface"
DAEMON_OPTS=" \
  ${HTTP_IP:+--http-ip=$HTTP_IP} \
  ${HTTP_PATH:+--http-path=$HTTP_PATH} \
  ${HTTP_PORT:+--http-port=$HTTP_PORT} \
  ${SMTP_IP:+--smtp-ip=$SMTP_IP} \
  ${SMTP_PORT:+--smtp-port=$SMTP_PORT} \
"
DAEMON_ARGS="--no-quit --verbose ${DAEMON_OPTS}"
